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.
Author |
Topic |
benams
Starting Member
1 Post |
Posted - 2010-03-01 : 04:14:56
|
I used an update sql statement to change a table of sqlserver 2005 and I want to bring it back to its former state. can I rollback the table somehow? |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-03-01 : 05:43:38
|
If you have started your update with a begin transactionthen you can dorollback if you want otherwise you have to docommit to release the changes and stop blocking the table.But I don't think you have started a transaction so your only chance is to have a backup. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-03-01 : 06:28:40
|
Restore the last backup alongside the current database and use update to copy the old values over. There's no undo once a transaction has committed. That happens automatically if you're not using explicit transactions (BEGIN TRANSACTION)--Gail ShawSQL Server MVP |
 |
|
|
|
|