Sunday, April 3, 2011

SQL Server Managment Studio and commit

Suppose I had a table with a large number of records, I wanted to update all the record in that table using SQL Server managment studio 2008, I typed:

Update Table set col1 = val

It will take a while for this command to update all the records, now if I pressed stop excutioin, what exactly will happen, some records will be upodated and committed or non like I've never excuted that command?

From stackoverflow
  • it will be all or nothing, it is a set based operation SQL Server uses implicit transaction if an explicit one has not been started, this is a way to ensure ACID

    so to answer your question if you stop it it will be in the same state as it was before you pressed ! or F5

    Bashar Kokash : I was afrid of the opposite, thanks

0 comments:

Post a Comment