locking_clause - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Publication Date
February 2025
Publication ID
B700-4600-008K
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
ft:sourceId
dita
dita:id
jbe1714339405530

For more information about the LOCKING clause, see LOCKING Request Modifier.

LOCKING
The type of lock to be placed on a database, table, view, or row hash. This setting overrides any default lock placed on that object by the system. See Views and the LOCKING Request Modifier.

item_to_lock

DATABASE
A lock is to be placed at the database level for this view definition.
database_name
user_name
Name of the database or user that is to be locked for this view definition.
TABLE
Specifies that a lock is to be placed at the table level for this view definition.
database_name
user_name
Name of the containing database or user for table_name if other than the current database or user.
table_name
Name of a user base table to be locked for this view definition.
VIEW
Specifies that a lock is to be placed at the view level for this view definition.
database_name
user_name
Name of the containing database or user for view_name if something other than the current database or user.
view_name
Name of a view to be locked for this view definition.
ROW
Specifies that a lock is to be placed at the row hash level for this view definition.
lock_type
The type of lock to be placed when accessing base tables through this view.
MODE
An optional keyword.
NOWAIT
Specifies that if the system cannot get the indicated lock, the request using this view must end.
This option can prevent a situation where a request is waiting for resources, possibly tying up other resources in the process of waiting for a lock to become available.