Oracle中复制表-常用sql

(1)复制表结构及数据:

 create table2 as select * from table1

(2)只复制表结构

  create table2 as select * from table1 where 1=2 // create table2 like table1

(3)只复制表数据

  insert into table1 select * from table2 //表结构一致

  insert into table1 (c1,c2,c3) select c1,c2,c3 from table2 pasting 

posted @ 2020-06-02 14:57  cjd1005  阅读(132)  评论(0)    收藏  举报