How do I transfer some rows from one table to another in the easiest possible manner? This is 开发者_JAVA技巧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.
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
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/
精彩评论