欢迎投稿

今日深度:

Hive的SQL,

Hive的SQL,


增加列,或者替换所有的列

 alter table table_name add|replace columns(col_name DataType[comments col_comment] ,...)
其中add表示增加新的列,而replace则表示用括号里面的列替换已经存在的列。


重新命名表名称

alter table table_name rename to new_table_name;

复制表的结构,但是不复制表的内容

create table tbl_name like tbl_other_name


www.htsjk.Com true http://www.htsjk.com/hive/38521.html NewsArticle Hive的SQL, 增加列,或者替换所有的列 alter table table_name add|replace columns(col_name DataType[comments col_comment] ,...) 其中add表示增加新的列,而replace则表示用括号里面的列替换已经存在的列。...
相关文章
    暂无相关文章
评论暂时关闭