1. 非分区表:
复制表结构: create table new_table as select * from exists_table where 1=0;
复制表结构和数据: create table new_table as select * from exists_table;
2. 分区表:
-- 创建一个分区表 drop table if exists kimbo_test; create table kimbo_test ( order_id int, system_flag string ) PARTITIONED BY(dt string ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '