[hive] hiveql 基础操作

1. 显示当前的数据库信息 

直接修改hive.site.xml ,永久显示

 2. 建表,模糊显示表信息

drop  table   表名称; --删除表

show tables ;--显示所有表

show tables like "*u*"; --- 模糊匹配表信息

create  table   ;--- 语法和mysql 相似,创建表

describe 表名字;

desc 表名字; -- 查看表结构

 3. 修改表名字 alter table 表名字  rename to  新表名。

 4.添加字段 alter table 表名字  add columns  

 5. 修改字段alter table 表明 change column oldcolumn  newcolumn  ;

原文地址:https://www.cnblogs.com/lonelywolfmoutain/p/6879758.html