hive alter table (删除某一列, 增加列)语句

Hive alter table 语句结构:


CREATE TABLE test (

creatingTs BIGINT,
a STRING,
b BIGINT,
c STRING,
d STRING,
e BIGINT,

f BIGINT
);

如果需要删除 column f 列,可以使用以下语句:

ALTER TABLE test REPLACE COLUMNS (

creatingTs BIGINT,
a STRING,
b BIGINT,
c STRING,
d STRING,
e BIGINT

);


增加列:

alter table of_test columns (judegment int)

你可能感兴趣的:(SQL,Hive)