February 5, 2009 at 10:49 pm
Hi Buddy's
This is lee
1). I opend a newquery window
2). I updated one row
how to roll back it. Before that I didn't given begint tran.
Regards
lee
February 5, 2009 at 11:49 pm
You can't. If you did not start an explicit transaction, then the changes were committed as soon as the statement completed and no rollback is possible
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 6, 2009 at 12:21 am
Did you just change one row? You are lucky, Just revert back the value.
You can restore the database to the earlier time but since its only one row, I would not be bothered
February 6, 2009 at 7:22 am
[font="Verdana"]
Lee From Bangalore (2/5/2009)
Hi Buddy'sThis is lee
1). I opend a newquery window
2). I updated one row
how to roll back it. Before that I didn't given begint tran.
Regards
lee
Always follow:
Begin
Begin Transaction
Update / Delete / Insert Statement
If @@Error
Begin
RollBack Transaction
Error Handling
End
Commit Transaction
End
Mahesh
[/font]
MH-09-AM-8694
February 6, 2009 at 8:39 am
Hi,
You need to Transaction Blocks to do it. By default if run any queries in Query Window , all of them are implicit commit.
You need to follow Mahesh's code to achieve.
Thanks
Vijaya Kadiyala
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply