标签:
表重命名
alter table t1 rename to t2;
alter table t1 add if not exists partition(xx=yy) location ‘/xx‘;
alter table t1 add if not exists
partition(x1=y1) location ‘/x1‘
partition(x2=y2) location ‘/x2‘
partition(x3=y3) location ‘/x3‘;
alter table t1 partition(xx=yy) set location ‘/xx‘;
alter table t1 drop if exists partitioin(xx=yy);
alter table t1 add columns(id int, name string);
alter table t1 change column id id2 int comment ‘‘;
alter table t1 replace columns(id int comment ‘‘, name string comment‘‘);
alter table t1 set tblproperties(‘k1‘=‘v1‘);
alter table t1 set fileformat sequencefile;
alter table t1 partition(x=y) set fileformat sequencefile;
alter table t1 set serde ‘xx.serde1‘ with serdeproperties(‘k1‘=‘v1‘);
alter table t1 set serdeproperties(‘k1‘=‘v1‘);
alter table t1 clustered by (id, name) sorted by (name) into 48 buckets;
alter table t1 archive partition(year=2014);
alter table t1 unarchive partition(year=2014);
alter table t1 enable no_drop;
alter table t1 disable no_drop;
alter table t1 partition(x=y) enable no_drop;
alter table t1 enable offline;
alter table t1 disable offline;
标签:
原文地址:http://www.cnblogs.com/lishouguang/p/4560785.html