Hive wiki
- Create/Drop/Truncate Table
排查问题用到了Create table as
create table xxx as select
- create table table1 as select * from table2 where 2=3;
根据table2的表结构,创建tables1 - create table table1 as select * from table2
根据table2的表结构,创建tables1,同时将table2的数据插入table1 - create table table1(column1_rename,column2_rename) as select column1,column2 from table2;
根据table2的表结构,创建tables1,重命名列,并复制数据