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
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10599713/viewspace-991299/ ,如需转载,请注明出处,否则将追究法律责任。