How do we rollback the table data in SQL Server

Answer Posted / umesh roy

Above code spelling are wrong on save Transaction
correct code are below which is executeable

begin transaction
save transaction t
delete from tablename where id=2
select * from tablename
------------------------------------------------------
the value id=2 will be deleted in the tablename
-------------------------------------------------------
rollback transaction t
select * from tablename

Is This Answer Correct ?    14 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is oracle faster than sql server?

549


what is a deadlock? : Sql server database administration

489


Describe the left outer join & right outer join. : sql server database administration

578


What are the tool windows in sql server management studio? : sql server management studio

610


What do you mean by 'normalization'?

595






What are the advantages of mirroring?

563


Why should you use or avoid select * statements?

568


How extra digits are handled with numeric data type literals?

517


What is the difference between index seek vs. Index scan?

566


How to encrypt data between dialogs?

560


What is the server name in sql server?

549


Is there any difference between the primary key and unique key?

562


Explain various On-Delete options in a DB table. Which is the default option?

886


What is the return type of executeupdate ()?

517


Can we use trigger new in before insert?

508