1

I was running an update sql server query.Unfortunately I realized that I miss a condition so I quickly canceled manually the query with the red (stop) button in sql server management studio. I want to know if a rollback is done on the updated data or not. It was a simple sql server query without begin transaction and commit or rollback clause.

Coding Enthusiast
  • 3,865
  • 1
  • 27
  • 50
user3569267
  • 1,065
  • 3
  • 14
  • 27

1 Answers1

4

Yes it should be rolled back. AFAIK, UPDATE/INSERT runs on implicit transaction block; i.e, they will either complete or not (atomic operation).

With that in mind, the moment you have clicked the red stop button; it must have rolled back the update operation transaction.

You can verify that, by issuing a select query against the same table and see if the data have been updated or not.

Rahul
  • 76,197
  • 13
  • 71
  • 125