Difference between revisions of "LOCK TABLE"
From Recital Documentation Wiki
Helengeorge (Talk | contribs) (→Class) |
Yvonnemilne (Talk | contribs) |
||
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Locks a table to control access by other processes | Locks a table to control access by other processes | ||
Line 10: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[CREATE DATABASE]], [[DISPLAY SCHEMAS]], [[SQL INSERT|INSERT]], [[LIST SCHEMAS]], [[OPEN DATABASE]], [[SQL SELECT|SELECT]], [[SET AUTOCATALOG]], [[SQL UPDATE|UPDATE]], [[SQL USE|USE]] | + | [[COPY DATABASE]], [[CREATE DATABASE]], [[DISPLAY SCHEMAS]], [[SQL INSERT|INSERT]], [[LIST SCHEMAS]], [[OPEN DATABASE]], [[SQL SELECT|SELECT]], [[SET AUTOCATALOG]], [[SQL UPDATE|UPDATE]], [[SQL USE|USE]] |
Line 35: | Line 33: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | LOCK TABLE staff | + | LOCK TABLE staff IN SHARE MODE |
− | IN SHARE MODE | + | |
</code> | </code> | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SQL]] | [[Category:SQL]] |
Latest revision as of 17:28, 22 December 2009
Purpose
Locks a table to control access by other processes
Syntax
LOCK TABLE [<database>!]<table> IN SHARE | EXCLUSIVE MODE [NOWAIT]
See Also
COPY DATABASE, CREATE DATABASE, DISPLAY SCHEMAS, INSERT, LIST SCHEMAS, OPEN DATABASE, SELECT, SET AUTOCATALOG, UPDATE, USE
Description
To lock tables to control access by other processes. The LOCK TABLE statement locks an entire table to restrict access by other users or transactions. There are no prerequisites required to perform this operation.
Keywords | Description |
---|---|
database | The name of the database to which the table belongs. Databases in Recital are implemented as directories containing files that correspond to the tables and associated files in the database. Operating System file protection can be applied individually to the files for added security. The directory is a sub-directory of the Recital data directory. The environment variable / symbol DB_DATADIR points to the current Recital data directory and can be queried using the GETENV() function. Files from other directories can be added to the database using the ADD TABLE command or via the database catalog and SET AUTOCATALOG functionality. The '!' character must be included between the database name and the table name. |
table | The name of the table to set the lock mode on. |
SHARE | Share locks allow queries on locked tables, but prevent updates. |
EXCLUSIVE | This lock denies access by any other process to the table |
NOWAIT | This specifies that if a lock cannot be granted immediately during an update, then an error should be returned. |
Example
LOCK TABLE staff IN SHARE MODE
Products
Recital Server, Recital