I have a table that has millions of rows.
Accidentally I wrote an update query over a table without where clause and clicked execute.
It started executing. After two seconds I realized the query is wrong and I clicked ‘Stop‘ button in Sql Server Management Studio. The query execution was stopped, this all happened within 7 seconds.
Now I am curious to know if there are any rows affected. If any which are they?
How to find it?
A single update statement will not update some rows. It’s all rows or none
This is the atomicity in the ACID properties which SQL server respects well.
Then the commit is at the end of the statement, so when you cancel there’s no commit