In Oracle, the SELECT FOR UPDATE statement is used to lock the records in the cursor result set. The locks are released when the next commit or rollback statement is issued.
To retrieve the rows from declared cursor in Oracle, use the following syntax:
cursor_name: The name of cursor.
select_statement: To populate the cursor result set.
column_list: The columns in the cursor result set that you wish to update.
NOWAIT: This is optional. The cursor does not wait for resources.
In the above example, shows how to use the SELECT FOR UPDATE statement.