SQL-Update的时候锁操作

update table set a='xxx' where b='yyyy'
 可以修改為:
 update table with(rowlock) set a='xxx' where b='yyyy'  --行锁定
 
update table with(pagelock) set a='xxx' where b='yyyy'  --页锁定
 
update table with(tablelock) set a='xxx' where b='yyyy'  --表锁定

posted @ 2014-04-17 17:35  只不过一场戏  阅读(473)  评论(0编辑  收藏  举报