开发者

copy data of a project(from a project table) from one database to other in Oracle

Could somebody tell me how to 开发者_运维知识库do this in Oracle:

I have a table named project in which there a multiple projects. I want to copy the data of a particular project from the source database to another database. The project doesn't exist(in the project table) in the destination database.

I want something like: copy from sourceDatabase to destinationDatabase create new_table using select * from project where name='Name of the project to be copied'


If you can and are allowed to create `database links, create one and then copy the data over the database link. That would be: on the destination db:

create database link db_link
connect to <username> 
identified by <password>
using '<connection_string>";

then

insert into projects 
select * from projects@db_link
where ....

Or,alternatively, try the copy command of SQL*Plus.

SQL> copy from <db_src> to <db_dest> append projects using select * from projects where ....


You can also use the expdp and impdp command to extract tables and import it anywhere you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜