Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Create backup of a table

Author  Topic 

sqlbasic_2008
Starting Member

6 Posts

Posted - 2009-05-05 : 14:23:03
I added a new row to a table and would like to save the previous version of the table into another table as a backup. How do i do this?

Please help!

Thank you.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-05-05 : 14:24:53
You can use the INSERT command for this, similar code as to what I posted in your other thread.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

sqlbasic_2008
Starting Member

6 Posts

Posted - 2009-05-05 : 14:25:22
Ok, thanks again Tara!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-05-05 : 14:25:41
No problem

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

sqlbasic_2008
Starting Member

6 Posts

Posted - 2009-05-05 : 14:31:19
I just figured that instead of creating another table as a backup for rollback, i can just delete that row as a rollback script.
Go to Top of Page
   

- Advertisement -