select for update functionality is based on the value of the configuration parameter select for update:
0 – Adaptive Server version pre-15.7 functionality applies. select for update is available only through cursors.
1 – Adaptive Server version 15.7 functionality applies. You can use select for update at the language level, outside of a cursor context.
In versions earlier than 15.7:
select for update is supported only for cursors.
Update locks are acquired for qualifying rows and block writers but not other readers.
You cannot use an order by clause with an updatable cursor because the clause automatically makes a cursor read-only.
In version 15.7 and later:
select for update is supported for language statements and for cursors.
Exclusive locks are acquired for qualifying rows of select for update, thereby blocking other readers and writers provided that you are:
Using datarows-locked tables
Using the command within a transaction-context, or in chained mode
select for update can have an order by clause for both language statements and cursors. Using an order by clause with a for update clause allows the cursor to be updatable.
For details on select for update syntax and usage, and for cursor scope and usage, see the Reference Manual: Commands.