hive 修改表

hive 修改表

20190831


  • 表重命名

关键字rename to

alter table t_name rename to new_t_name
  • 修改列信息

关键字change column
即使字段名或者字段类型没有改变,也要完全指定旧的字段名
若将字段放在第一个位置,将after 某字段改为first

alter table t_name 
change column old_字段 new_字段 new_字段类型 new_注释
after 某字段;
原文地址:https://www.cnblogs.com/damahuhu/p/11675618.html