hive的简单使用

显示数据库:

hive> show databases;

创建数据库:

hive> create database sunhive;

删除数据库:

hive> drop database if exists sunhive;

创建表:

hive> create table wyp (id int, name string, age int, tel string) row format delimited fields terminated by '	'  stored as textfile;

添加数据:

hive> load data local inpath '/Users/wochu/Desktop/tool/hdfs/fz.txt' into table wyp;

删除表内数据:

hive> truncate table wyp;

删除表:

hive> drop table if exists wyp;
原文地址:https://www.cnblogs.com/sunyaxue/p/9052800.html