If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > simple rollback

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-01-10, 04:18
benams benams is offline
Registered User
 
Join Date: Mar 2010
Posts: 3
simple rollback

I have 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?
Reply With Quote
  #2 (permalink)  
Old 03-01-10, 09:52
MCrowley MCrowley is offline
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 4,899
By default SQL Server runs with implicit transactions. Unless you declare a transaction with BEGIN TRANSACTION, the update is automatically committed. If you did issue a BEGIN TRANSACTION before your update statement, you can issue a ROLLBACK TRANSACTION command, and the data will return to its original state. If not, then you will have to look at restoring the database to recover any lost data.
Reply With Quote
Reply

Tags
backup, rollback, sql

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On