已知原表复制新表

来源:互联网 发布:淘宝上的经典搞笑好评 编辑:程序博客网 时间:2024/04/27 16:32

1.只复制原表的结构:

create table newTable as select * from oldTable where 1=2;

2.复制原表的结构并且数据也拿过来:

create table newTable as select * from oldTable where 1=1;


原创粉丝点击