Script data in one table on one server and insert into the same table in another server
I have a table on my QA Environme开发者_JAVA技巧nt. I want to copy the data from that table to the same table in another environment. How can I do this??
The best way would be to use a tool specifically designed for this - Red-Gate SQL Data Compare.
It costs a little bit - but it's worth every penny ! It will save you loads of grief and time - it can easily compare two existing database tables, and copy only those rows that are new (or have changed). You can work from a SQL backup file, too - excellent stuff. Check it out!
I assuming you want two table with same data. You can use SSMS Import Data function. http://msdn.microsoft.com/en-us/library/ms140052.aspx
The easiest method is to use an SSIS package.
精彩评论