How do we rollback the table data in SQL Server

Answer Posted / elumalai.k

begin transaction
save transcation t
delete from tablename where id=2
select * from tablename
------------------------------------------------------
the value id=2 will be deleted in the tablename
-------------------------------------------------------
rollback transcation t
select * from tablename
---------------------------------------------------------
if u give rollback the deleted values will be seen again

Is This Answer Correct ?    22 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data file in computer?

705


Which tools are available to manage SQL Azure databases and servers?

107


What is scrollable cursor?

752


What are the advantages of having an index on the sql server?

687


What is the difference between implicit and explicit transaction?

734






explain how to create a new schema in a database? : Sql server database administration

782


What is key attribute?

699


What is the use of @@spid?

744


How does normalization work?

689


How to loop through result set objects using odbc_fetch_row()?

645


What is the command dbcc checkdb used for?

710


what is the system function to get the current user's user id? : Sql server database administration

733


Write a sql query to display the current date?

826


How do database indexes work?

721


how to overcome kernel isssues

1353