DML Locks Automatically Acquired for DML Statements (349)

tsinglee發表於2007-12-11

The previous sections explained the different types of data locks, the modes in which
they can be held, when they can be obtained, when they are obtained, and what they
prohibit. The following sections summarize how Oracle automatically locks data on
behalf of different DML operations.

執行DML語句時自動獲得的DML鎖, 獲取的行鎖和表鎖見下表

Locks Obtained By DML Statements
DML Statement Row Locks? Mode of Table Lock
SELECT ... FROM table
INSERT INTO table ... X RX
UPDATE table ... X RX
DELETE FROM table ... X RX
SELECT...FROM table ...FOR UPDATE OF X RS
LOCK TABLE table IN ...
ROW SHARE MODE RS
ROW EXCLUSIVE MODE RX
SHARE MODE S
SHARE EXCLUSIVE MODE SRX
EXCLUSIVE MODE X

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-991299/,如需轉載,請註明出處,否則將追究法律責任。

相關文章