使用copy命令拷贝数据表
2015-09-02 10:26
344 查看
实现同一个数据库不同用户间的表的拷贝
首先看下copy命令的解释
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
首先给两个不同的用户授予表空间无限制操作权限
grant ulimited tablespace to test1;
grant ulimited tablespace to test;
SQL> copy from test1/test1@orcl1 to test/test@orcl1 create goods using select * from goods;
Array fetch/bind size is 15. (arraysize is 15)
Will commit when done. (copycommit is 0)
Maximum long size is 80. (long is 80)
Table GOODS created.
16 rows selected from test1@orcl1.
16 rows inserted into GOODS.
16 rows committed into GOODS at test@orcl1.
首先看下copy命令的解释
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
首先给两个不同的用户授予表空间无限制操作权限
grant ulimited tablespace to test1;
grant ulimited tablespace to test;
SQL> copy from test1/test1@orcl1 to test/test@orcl1 create goods using select * from goods;
Array fetch/bind size is 15. (arraysize is 15)
Will commit when done. (copycommit is 0)
Maximum long size is 80. (long is 80)
Table GOODS created.
16 rows selected from test1@orcl1.
16 rows inserted into GOODS.
16 rows committed into GOODS at test@orcl1.
相关文章推荐
- ArcGis Desktop10 注册机授权方法与安装步骤
- Hadoop学习5_Hadoop:hdfs-site.xml,mapred-site.xml,core-site.xml 配置项清单
- OAuth1 OAuth2 OPenid 整合 带源码
- Linux 解压
- CentOS7 apache
- Tomcat中server.xml文件内各节点详解
- linux命令后台运行
- shell脚本里的if语句学习
- Linux常用工具系列 ------- yum
- 在Hadoop1.2.1分布式集群环境下安装hive0.12
- Linux 下关闭防火墙设置
- linux命令(6) zip/unzip及tar压缩与解压文件命令笔记
- linux下监听指定进程的资源使用率pidof,top
- 使用AVAudioPlayer播放音乐
- 在Linux服务器下载上传文件到windows
- wed网页随机产生验证码图片(版本tomcat-8.0.14)
- Linux tar命令详解
- 微博CacheService架构浅析
- shell常用语句
- centos6.4下安装php的imagick和imagemagick扩展教程