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

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'原始设备唯一性标识’;

https://blog.csdn.net/aijiudu/article/details/79066835

你可能感兴趣的:(bigdata)