LOCK

Synopsis

Use the LOCK statement to lock a table.

Syntax

  1. lock_table ::= LOCK [ TABLE ] { { [ ONLY ] name [ * ] } [ , ... ] }
  2. [ IN lockmode MODE ] [ NOWAIT ]
  3. lockmode ::= ACCESS SHARE
  4. | ROW SHARE
  5. | ROW EXCLUSIVE
  6. | SHARE UPDATE EXCLUSIVE
  7. | SHARE
  8. | SHARE ROW EXCLUSIVE
  9. | EXCLUSIVE
  10. | ACCESS EXCLUSIVE

lock_table

LOCK - 图1

lockmode

LOCK - 图2

Semantics

lock_table

name

Specify an existing table to lock.

lockmode

  • Only ACCESS SHARE lock mode is supported at this time.
  • All other modes listed in lockmode are under development.
  1. ACCESS SHARE
  2. | ROW SHARE
  3. | ROW EXCLUSIVE
  4. | SHARE UPDATE EXCLUSIVE
  5. | SHARE
  6. | SHARE ROW EXCLUSIVE
  7. | EXCLUSIVE
  8. | ACCESS EXCLUSIVE

See also