Oracle 表快捷复制方法

复制表及数据
creat table emp as select * from scott.emp;

复制表结构
create table emp as select * from scott.emp where 1<>1;

复制指定字段
create table emp as select ename,job scott.emp where 1<>1;

复制表数据
insert into t_1 select * from sys.t_1

复制表指定字段数据

insert into t_1 select id,name from sys.t_1

 

请注意,以上操作将复制数据字段及其数据,但不会复制索引、约束、默认值等表结构相关信息。如果需要完整复制表结构以及数据字段,可以使用其他方法,如导出和导入工具(expdp和impdp)或者使用第三方ETL工具。

posted @ 2024-03-06 17:31  ZhengLiming  阅读(114)  评论(0编辑  收藏  举报