SET LOCK_TIMEOUT 1000
begin tran TranNameA
select * from tablenameA WITH (updlock) where...
waitfor delay '00:00:05'
https://blog.csdn.net/ruthywei/article/details/73558885
query1:
begin tran TranNameA
select * from [cap-test].[Cap].[Received] with (rowlock holdlock) where id='1054025814804271104'
waitfor delay '00:00:35'
commit tran TranNameA
query2:
update [cap-test].[Cap].[Received] set Retries=1 where id='1054025814804271104'
query3:
select * from [cap-test].[Cap].[Received] where id='1054025814804271104'
从query1顺序执行到query3
query3这个时候也需要等待