Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ROLLBACK A DELETE QUERY

Status
Not open for further replies.

Fatih235

MIS
May 30, 2002
19
0
0
US
hey all;
I have a statement like this

BEGIN TRANSACTION trans1
insert into auto(auto_id,aout_name)values('2','Porsche')

and after i run this ,i write
ROLLBACK TRANSACTION trans1
and it rolls back succesfully.

When i try to do the same thing with delete query like,
BEGIN TRANSACTION trans2
delete from auto where auto_id=5

it deletes the record but when i try to rollback like,

ROLLBACK TRANSACTION trans2

it gives an error like "rollback cant be done ,there is no trans2"



Guys,i guess i am doing something wrong .What is the rollback statement fro delete queries.How can we save our records by deleting with wrong logic or accidentially.Thnks.








 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top