赞
踩
hive表在某个特定的位置添加一个字段,在操作上是先在表的最后添加一个字段然后再将该字段移动到那个特定的位置
alter table table_name add columns now_time string comment '当前时间';
alter table table_name change now_time now_time string after id;
Hive整体更改指令
ALTER TABLE table_name CHANGE [COLUMN] col_old_name col_new_name column_type [COMMENT col_comment] [FIRST|AFTER column_name]
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。