(1)啟動hive
/hive
(2)檢視資料庫
hive> show databases;
(3)打開預設資料庫
hive> use default;
(4)顯示default資料庫中的表
hive> show tables;
(5)建立一張表
hive> create table student(id int, name string);
(6)顯示資料庫中有幾張表
hive> show tables;
(7)檢視表的結構
hive> desc student;
(8)向表中插入資料
hive> insert into student values(1000,“ss”);