将表从一个数据库复制到另一个数据库 [英] Copy tables from one database to another

查看:292
本文介绍了将表从一个数据库复制到另一个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在使用数据库,需要将现有数据库的某些表复制到另一个表.请为我提供有关如何执行上述操作的解决方案(查询-不通过向导).

P.S. -我正在研究 Firebird SQL

等待回复...

谢谢,
Hamza

Hello,

I am working on a database and need to copy some tables of my existing database to another. Please provide me with a solution (Queries - Not through wizard) on how to do the above.

P.S. - I am working on Firebird SQL

Awaiting replies...

Thanks,
Hamza

推荐答案

u可以将选定的数据/表/记录插入到另一个数据库的表中,请尝试以下示例:

插入TargetDb.dbo.TargetTable(Col1,col2,...)
选择ColId,SomeCol1,SomeCol2 ...
从SourceTable
u can insert selected data/table/record to another database''s table try the following sample:

insert into TargetDb.dbo.TargetTable(Col1,col2,...)
Select ColId,SomeCol1,SomeCol2...
From SourceTable


insert into TestDestination.dbo.Employee (Column1, Column2, ...)
select  (Column1, Column2, ...) from TestSource.dbo.Employee



这将在TestDestination数据库中创建一个新表



This will create a new table in TestDestination database

select  (Column1, Column2, ...) into Employee  from TestSource.dbo.Employee


这篇关于将表从一个数据库复制到另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆