SQL is a set language. there are no 'first', 'previous' or 'next' concepts. All rows are updated simultaneously.
Which row is updated first?
-
23-06-2023 - |
Domanda
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.
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow