您的位置:首页 > 数据库 > SQL

sqlplus使用copy命令在两个数据库之间更新数据

2014-10-17 14:31 176 查看
SQL> help copy

COPY

----

Copies data from a query to a table in the same or another

database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.

COPY {FROM database | TO database | FROM database TO database}

{APPEND|CREATE|INSERT|REPLACE} destination_table

[(column, column, column, ...)] USING query

where database has the following syntax:

username[/password]@connect_identifier

SQL> create table t1 as select * from all_objects where rownum <10;

表已创建。

SQL> select count(*) from t1;

COUNT(*)

----------

9

SQL> copy from scott/oracle@ora to scott/oracle@ora11 create t2

using select * from t1 where rownum <5;

数组提取/绑定大小为 15。(数组大小为 15)

将在完成时提交。(提交的副本为 0)

最大 long 大小为 5000。(long 为 5000)

表 T2 已创建。

4 行选自 scott@ora。

4 行已插入 T2。

4 行已提交至 T2 (位于 scott@ora11)。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐