单建表:
create table SEC_LOGIN_LOG_201203 as select * from SEC_LOGIN_LOG_201201 where 1=2
根据某些列建表:
create table so1.h_ins_prod1 as (select t1.h_id,t2.* from so1.h_ins_prod t1,so1.ins_prod t2 where 1=2);
本文介绍了SQL建表的基本方法,包括单建表和根据特定列构建表。通过实例展示了如何使用SQL语句创建表,并讨论了这两种方法的适用场景。
单建表:
create table SEC_LOGIN_LOG_201203 as select * from SEC_LOGIN_LOG_201201 where 1=2
根据某些列建表:
create table so1.h_ins_prod1 as (select t1.h_id,t2.* from so1.h_ins_prod t1,so1.ins_prod t2 where 1=2);

被折叠的 条评论
为什么被折叠?