session1
update t_table set score+=1 where userid=100session2
update t_table set score+=1 where userid=100前提是userid是聚集索引,或非聚集索引
update t_table set score+=1 where userid=100session2
update t_table set score+=1 where userid=100前提是userid是聚集索引,或非聚集索引
http://bbs.csdn.net/topics/250022124
共享锁之间不冲突。共享锁与意向更新锁不冲突,意向更新锁之间不冲突,意向更新锁与更新锁冲突,更新锁只能有一个能获取到。所以,当两个查询有了意向更新锁,升级为更新锁时,都等待另一个释放,所以死锁。
https://msdn.microsoft.com/zh-cn/library/ms177433(v=sql.105).aspx你这样的情况会一直等待,程序调用会超过
阻塞分析
http://blog.csdn.net/roy_88/article/details/2682044