连接1:
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
begin transaction
select top 4 * from admin_inputproducts with(updlock,readpast) where istop=1
waitfor time '10:37'
commit
连接2: //连接1读取到的记录连接2是不会读取的。
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
begin transaction
select top 4 * from admin_inputproducts with(updlock,readpast) where istop=1 //如果将updlock改为xlock会commit
//并发连接
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
begin transaction
waitfor time '11:15'
select top 1 id from mm
with(xlock,readpast) where istop=1
commit
连接2
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
begin transaction
waitfor time '11:15'
select top 1 * from mm
with(xlock,readpast) where istop=1
commit
数据是不一样的