[英]Copy specific table data from one database to another in SQL Server
I need to copy specific data from select set of tables in one SQL Server to another SQL Server. 我需要将特定数据从一个SQL Server中的选定表集中复制到另一个SQL Server。 Any pointers to this will be really helpful.
对此的任何指示将非常有帮助。
Create a linked server or use Openrowset to create a connection with remote server. 创建链接服务器或使用Openrowset创建与远程服务器的连接。
use linked server if you need to perform routine task with remote server else use openrowset. 如果需要对远程服务器执行例行任务,请使用链接服务器,否则请使用openrowset。
http://msdn.microsoft.com/en-us/library/ms190479.aspx http://msdn.microsoft.com/en-us/library/ms190479.aspx
还有一个SSIS向导,又名SQL Server导入/导出向导,而不是完整的表副本,而是指定源查询,保存到磁盘(假设您需要定期重新运行该过程),瞧,将数据复制到一个盒子中
you can copy data from one database to another. 您可以将数据从一个数据库复制到另一个数据库。 The mysql query is:
mysql查询是:
insert into database2.table_name2(field name)
select table_name1.field_name from table_name1
where table_name1.field_name = condition
The above mysql query is used for copy specific data between databases. 上面的mysql查询用于在数据库之间复制特定的数据。 Suppose you want to copy whole table datd, then you will use following query:
假设您要复制整个表的数据,那么您将使用以下查询:
insert into database2.table_name2(field name)
select table_name1.field_name from table_name1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.