摘要:
SQL SERVICE中的几个锁SELECT * FROM dbo.TableName WITH (NOLOCK) --不加任何锁的读,脏读SELECT * FROM dbo.TableName WITH (HOLDLOCK) --加共享锁,可读单不可更新和删除SELECT * FROM dbo.TableName WITH (UPDLOCK) --加修改锁SELECT * FROM dbo.TableName WITH (TABLOCK) --加表锁,SELECT * FROM dbo.TableName WITH (PAGLOCK) --默认选项页锁SELECT * FROM dbo.Ta 阅读全文