A LOCK TABLE statement lock one or more tables, partitions, or subpartitions 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.
Some forms of locks can be placed on the same table at the same time.
Other locks allow only one lock for a table.
A locked table remains locked until you either COMMIT your transaction or ROLLBACK (entirely or to a savepoint).
LOCK TABLE [schema.] table [options] IN lockmode MODE [NOWAIT]
LOCK TABLE [schema.] view [options] IN lockmode MODE [NOWAIT]
options: PARTITION, SUBPARTITION, @dblink
lockmodes: EXCLUSIVE, SHARE, ROW EXCLUSIVE, SHARE ROW EXCLUSIVE, ROW SHARE, SHARE UPDATE
A lock never prevents other users from querying the table.
A query never places a lock on a table.
Readers never block writers and writers never block readers.
LOCK TABLE country IN EXCLUSIVE MODE NOWAIT;