Reputation: 4634
How do I transfer some rows from one table to another in the easiest possible manner? This is a one time thing. I was hoping I could use VS2010 copy and paste function in Server Explorer, but it doesn't allow me to paste in rows.
Upvotes: 1
Views: 2410
Reputation: 2154
select * into <destination table> from <source table>
Example:
select * into employee_backup from employee
You can add WHERE clauses and specify columns as needed.
As per http://cavemansblog.wordpress.com/2009/06/09/sql-server-how-to-copy-a-table/
Upvotes: 0
Reputation: 44032
As the table schema is the same then you can use copy and paste using Sql Server Management Studio rather than VS2010
You could also use a T-SQL statement using SSMS
Insert Into dbo.TableB (ColumnA, ColumnB, ColumnC ...)
Select ColumnA, ColumnB, ColumnC ...
From dbo.TableA
Upvotes: 3