像这样的原因是什么
DECLARE @i int = 0
WHILE @i < 100 BEGIN
BEGIN TRAN
SET @i = @i + 1
DELETE TOP (20) st
FROM SomeTable st
JOIN #ToDelete ON #ToDelete.Id = st.Id
COMMIT
END
应该使用而不是这样的东西?
DELETE st
FROM SomeTable st
JOIN #ToDelete ON #ToDelete.Id = st.Id