如何将数据从一个数据库复制到另一个数据库? [英] how to copy data frm one database to another ?
本文介绍了如何将数据从一个数据库复制到另一个数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想写一个sql脚本将数据库数据从一个数据库复制到另一个数据库(我可能会复制具有一定条件的数据)。
所以我该怎么办?
i want to write a sql script to copy database data from one database to another one ( i may copy data with a certain conditions).
so how can i do it??
推荐答案
这取决于您使用的数据库(或不同的数据库)。您可以 Google [ ^ ]。
That depends on the database (or the different databases) you are using. You might Google for that[^].
尝试这样...
try like this...
select * into new_databasename.dbo.tablename from databasename.dbo.tablename
select * into new.dbo.employee from test.dbo.employee where name='pri'
这篇关于如何将数据从一个数据库复制到另一个数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文