Click to See Complete Forum and Search --> : [RESOLVED] Copy one recordset from table1 to table2??


WolfShade
05-07-2007, 01:46 PM
Hello, all.

The client that I am currently working for has one concern regarding the CMS that I am building for them; accidentally deleting an article that wasn't supposed to be deleted.

I suggested multiple alert messages before actually deleting the recordset, but they didn't like that idea. What they want is to have a table that has duplicate columns that would receive a copy of the article from the original table prior to deleting the article from the original table (ie, a backup table for the article table.)

Is there a command in SQL (I've been looking through Books Online; must not be using the right keywords) that will copy one single recordset from tableA to tableB? If I can do this using a stored procedure instead of manually inserting the data into the backup table, t'would rock most excellently.

Thank you,

^_^

WolfShade
05-07-2007, 03:37 PM
I found the answer, elsewhere:

http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-programming/55389/Copy-from-one-table-to-another


INSERT into table_B
select *
from table_A
where itemID=xx

^_^