I update more rows by UPDATE statement in MSSQL. I'd like to know which row is the first updated one.


Details:

I am having troubles with a trigger written by someone else. It doesn't proceed for one row. The trigger is fired by UPDATE to all rows (~30k) excluding those which were already sucessfully updated before. The problematic row is now the next one which is supposed to be updated. I need to find the row somehow. Is there some way?

I've read a few posts how to imitated UPDATE with ORDER BY and it didn't work for me.

有帮助吗?

解决方案

SQL is a set language. there are no 'first', 'previous' or 'next' concepts. All rows are updated simultaneously.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top