您的位置:首页 > 其它

hive表新增字段和字段注释修改

2018-01-15 17:24 1911 查看
hive表新增字段,修改字段的注释

(1)创建测试表:

use mart_flow_test;

create table if not exists mart_flow_test.detail_flow_test

(

    union_id          string    comment '设备唯一标识'

) comment '测试表'

partitioned by (

    partition_date    string    comment '日志生成日期'

) stored as orc;

(2)新增字段:use mart_flow_test;

    alter table detail_flow_test add columns(original_union_id string);

(3)修改注释:use mart_flow_test;

    alter table detail_flow_conversion_base_raw change column original_union_id original_union_id string COMMENT'原始设备唯一性标识’;

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: