LOCKING Request Modifier Use with DML Statements - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The following table lists the associations between individual SQL DML statements and lock upgrades and downgrades at the row (rowkey or rowhash), view, base table, and database object levels:

LOCKING Modifier Severity SQL DML Statements
EXCLUSIVE or WRITE
  • DELETE
  • INSERT
  • MERGE
  • SELECT
  • SELECT AND CONSUME
  • UPDATE
READ or SHARE SELECT
ACCESS SELECT
ACCESS for LOAD COMMITTED SELECT

EXCLUSIVE and WRITE are the only lock severities for the DELETE, INSERT, MERGE, UPDATE, and SELECT AND CONSUME statements, because the default lock severity for these statements is WRITE. You cannot downgrade a WRITE lock for these statements. Because the SELECT statement does not change data, and therefore cannot compromise database integrity, you can change its default locking severity to any other severity.

If you specify locking severity levels lower than those in the preceding table, the system uses WRITE.

For details about locking levels, locking severities, and the relationship between them, see Database Locks, Two-Phase Locking, and Serializability.