Processing SELECT FOR UPDATE Statements

For maximum interoperability, applications should generate result sets that will be updated with a positioned update statement by executing a SELECT FOR UPDATE statement. Although the cursor library does not require this, it is required by most data sources that support positioned update statements.

The cursor library ignores the columns in the FOR UPDATE clause of a SELECT FOR UPDATE statement; it removes this clause before passing the statement to the driver. In the cursor library, the SQL_ATTR_CONCURRENCY statement attribute, along with the restrictions mentioned in the previous section, controls whether the columns in a result set can be updated.