请参阅这些链接 SqlBulkCopy类 [ ^ ] 使用C#.Net进行SQL批量复制 [ ^ ] 使用SqlBulkCopy传输数据 [ ^ ] 这个概念可以帮助你大量数据。 [更新]:示例 insert into table1 select * 来自 table2 其中 table2.xyzid 不 (选择 xyzid 来自 table1) 这里可以找到更多选项 SQL Server将所有行从一个表复制到另一个表,即复制表 [ ^ ] 问候......:笑: 试试这个: INSERT INTO DATABASE2.DBO.TABLEX(FIELD1,FIELD2,...) SELECT FIELD1,FIELD2,... FROM DATABASE1.DBO.TABLEX - 非字段列表必须与表格相同 Hi Frnds, I need to transfer datas from one database table to another database table.How to write query for that. 解决方案 Have a look here:Move a database from one server to another server in SQL Server 2008[^]SQL SERVER – Insert Data From One Table to Another Table – INSERT INTO SELECT – SELECT INTO TABLE[^]Transferring Data from One Table to Another[^]Refer to these linksSqlBulkCopy Class[^]SQL Bulk Copy with C#.Net[^]Transferring Data Using SqlBulkCopy[^]This concept will help you even with the large amount of data.[Update]:Exampleinsert into table1select * from table2where table2.xyzid not in(select xyzid from table1)And more options can be found hereSQL Server copy all rows from one table into another i.e duplicate table[^]Regards..:laugh:Try this :INSERT INTO DATABASE2.DBO.TABLEX(FIELD1, FIELD2, ...)SELECT FIELD1, FIELD2, ... FROM DATABASE1.DBO.TABLEX-- NOT FIELD LIST MUST BE SAME FOR BOTH TABLES 这篇关于将数据从一个数据库表移动到另一个数据库表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-28 12:50