declare cur cursor for select ....
open cur
while @@fetch_status=0
begin
???? if exists(select 1 from tb where id=@id)
begin
update tb set .... where id=@id
end
else
begin
insert tb....
end
fetch next from cur into....
end
close cur
deallocate cur
?
在長事務(wù)里面阻塞了其他查詢,請問怎么處理比較好。
游標(biāo)阻塞問題
Qyouu
2018-12-06 20:35:04