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

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - SQL 的用法 » 创建数据库 » 使用事务和隔离级别 » 锁定的工作方式

 

表锁

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

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

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

共享 意图 独占
共享 冲突 冲突
意图 冲突 冲突
独占 冲突 冲突 冲突

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