LOCK TABLE
The LOCK TABLE statement locks a table in a specified mode. This lock manually overrides automatic locking and permits or denies access to a table or view by other users for the duration of your operation.
General format
EXEC SQL [ AT Database ] LOCK TABLE Options END-EXEC |
Syntax rules
1. Options is passed to the driver without further checks. Refer to the database documentation for detailed syntax. Syntax errors, if any, are returned at runtime.
General rules
1. Database identifies the active connection that will execute the query and must be previously defined using a Format 4
DECLARE statement.
Examples
Lock customers table on Oracle database
exec sql lock table customers in row exclusive mode nowait end-exec |