select for update

select for update exclusively locks rows in datarows-locked tables for subsequent updates within the same transaction, and for updatable cursors.

functionality is automatically available to clients when the for update clause is added to a select statement and to any updatable cursors opened within the clients. select for update is supported at isolation levels 1, 2, and 3.

select for update can be issued as a language statement outside of a cursor context. With both language statements and cursors, you must execute select for update within a begin transaction command or in chained mode.

If you run select for update within a cursor context, the cursor open and fetch statements must be within the context of a transaction.

The synax is:

select <col-list> from … where …
	[for update[ of col-list ]
Note: To obtain exclusive locks, you must set the select for update configuration parameter to 1, and include the for update clause.