Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 (中文) » SQL Anywhere 服务器 - SQL 的用法 » 使用事务和隔离级别 » 锁定的工作方式

 

表锁

除了支持行锁,SQL Anywhere 还支持表锁。表锁不同于模式锁:表锁在表的所有行上放置锁,而模式锁在表的模式上放置锁。有三类表锁:

只有在事务结束(发生 COMMIT 或 ROLLBACK)后才释放表锁。

下表显示了哪两个表锁之间会发生冲突。

Shared Intent Exclusive
Shared conflict conflict
Intent conflict conflict
Exclusive conflict conflict conflict

共享表锁
意图写表锁
独占锁