I have two tables with the same column definitions. I need to move (not copy) a row from one table to another. Before I go off and use INSERT INTO/DELETE (in a transaction
INSERT dbo.newtable( name, department, Salary ) SELECT name, FirstName, Lastname FROM ( DELETE dbo.oldtable OUTPUT DELETED.name, DELETED.department, DELETED.Salary WHERE ID IN ( 1001, 1003, 1005 ) ) AS RowsToMove SELECT * FROM dbo.newtable SELECT * FROM dbo.oldtable