Fight With Me!!!

导航

如何复制表

1、既复制表结构也复制表内容的SQL语句:CREATE TABLE tab_new AS SELECT * FROM tab_old;

2、只复制表结构不复制表内容的SQL语句:CREATE TABLE tab_new AS SELECT * FROM tab_old WHERE 1=2;
3、不复制表结构,只复制内容的sql语句:insert into tab_new select * from tab_old;或者SELECT vale1, value2 into Table2 from Table1

posted on 2018-05-22 14:17  nickTimer  阅读(291)  评论(0编辑  收藏  举报