oracle 12c在获取行锁时会自动获取表锁吗?

Afl*_*red 2 oracle oracle12c

它在文档中说oracle 12c在获取行锁时获取表锁。在sql server中不是这样,这很令人困惑。

A row lock, also called a TX lock, is a lock on a single row of a table. A transaction acquires a row lock for each row modified by one of the following statements: INSERT, UPDATE, DELETE, MERGE, and SELECT ... FOR UPDATE. The row lock exists until the transaction commits or rolls back.

***When a transaction obtains a row lock for a row, the transaction also acquires a table lock for the table in which the row resides***. The table lock prevents conflicting DDL operations that would override data changes in a current transaction.
Run Code Online (Sandbox Code Playgroud)

有人可以阐明这一点吗?

Mat*_*eak 5

发生的表锁是共享锁。同一张表可以同时允许任何数量的共享锁:它们不会互相干扰。

他们所做的是防止任何事情在该表上获得排他锁:例如,更改表的结构。