Locks a database, table, view, or row at the specified severity, overriding the default locking severity that the system places for a request. With the appropriate privileges, you can place this lock to upgrade or downgrade the default lock.
You can specify the LOCKING modifier with DML statements and with DDL statements CREATE VIEW, REPLACE VIEW, CREATE RECURSIVE VIEW, REPLACE RECURSIVE VIEW, CREATE MACRO, and REPLACE MACRO. You can use the LOCKING modifier to override the default locking severities and prevent deadlocks.
For more information, see:
- EXPLAIN Request Modifier and Column-Partition Access
- Teradata® DSA User Guide, B035-3150
Also see the following sections:
ANSI Compliance
LOCKING is a Teradata extension to the ANSI SQL:2011 standard.
Other SQL dialects support similar non-ANSI standard statements with names such as LOCK TABLE.
Required Privileges
None.