Summary of Table Locks
SQL Statement | Table Lock Mode | RS | RX | S | SRX | X |
---|---|---|---|---|---|---|
SELECT...FROM table ... | none | Y | Y | Y | Y | Y |
INSERT INTO table ... | RX | Y | Y | N | N | N |
UPDATE table ... | RX | Y* | Y* | N | N | N |
DELETE FROM table ... | RX | Y* | Y* | N | N | N |
SELECT ... FROM table FOR UPDATE OF ... | RX | Y* | Y* | N | N | N |
LOCK TABLE table IN ROW SHARE MODE | RS | Y | Y | Y | Y | N |
LOCK TABLE table IN ROW EXCLUSIVE MODE | RX | Y | Y | N | N | N |
LOCK TABLE table IN SHARE MODE | S | Y | N | Y | N | N |
LOCK TABLE table IN SHARE ROW EXCLUSIVE MODE | SRX | Y | N | N | N | N |
LOCK TABLE table IN EXCLUSIVE MODE | X | N | N | N | N | N |
RX: row exclusive
S: share
SRX: share row exclusive
X: exclusive