Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Rollback update statement

Author  Topic 

gj0519
Starting Member

13 Posts

Posted - 2009-06-11 : 10:42:37
SQL Server 2008
Is there a way to rollback an update statement?

Thanks,

GJ

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-06-11 : 11:33:12
begin tran
update ...
commit tran OR rollback tran

When already commited you cannot do a rollback.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-11 : 12:48:56
and if you've not used transaction, then only way is to restore from earlier backups.If you have transaction log backups, you might be able to restore to the point in time just before to update occured.
Go to Top of Page
   

- Advertisement -