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

What is logon trigger?

716


When columns are added to existing tables, what do they initially contain?

801


How do I open port 1433?

694


Is INSTEAD OF trigger directly applicable to Table ?

735


What is usually the first word in a sql query?

814






What is the purpose of indexing?

789


How to convert character strings into numeric values?

775


Can a table have 2 foreign keys?

668


How to add an address record into adventureworkslt?

750


what is denormalization? : Sql server database administration

654


What is SQL Azure?

101


Your company has 50 branches all over the country all the branches, including the head office have sql server as the database every night all 50 branches upload certain information to the head office which replication topology is best suited for the above scenario?

808


What do you mean by data manipulation language?

764


Can we deploy SSRS reports on our personal website?

148


How to create a local temporary stored procedure?

685