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 '\t'  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;

 

posted on 2018-05-17 19:37  sunyaxue  阅读(148)  评论(0编辑  收藏  举报

导航