- insert into select
-
语句形式为:Insert into Table2(field1,field2,...) select value1,value2,... fromTable1
- 要求
-
- 目标表必须存在
- 除了可以插入源表外还能插入常量
2. select into from
- 语句形式:SELECTvale1, value2 into Table2 from Table1
- 要求
- 目标表不存在
3. 既复制表结构也复制表内容的SQL语句:CREATE TABLE tab_new AS SELECT * FROM tab_old;
4. 只复制表结构不复制表内容的SQL语句:CREATE TABLE tab_new AS SELECT * FROM tab_old WHERE 1=2
4. 只复制表结构不复制表内容的SQL语句:CREATE TABLE tab_new AS SELECT * FROM tab_old WHERE 1=2