这个脚本需要几个小时才能执行,有没有办法删除光标并仍然在主键上迭代表responseId
?
DECLARE ResponseCursor CURSOR
FOR
SELECT responseId FROM ResponseTable
FETCH NEXT FROM ResponseCursor INTO @ResponseId
WHILE @@fetch_Status =0
BEGIN
--Insert Logic
FETCH NEXT FROM ResponseCursor INTO @ResponseId
END
CLOSE ResponseCursor
DEALLOCATE ResponseCursor
谢谢。