创建数据表

create table wp_user_1 (id int,post_date timestamp,post_content strin,post_title string,post_status string,guid string) row format delimited fields terminated by ‘,’;

导入本地数据

load data local inpath ‘/root/input/students.txt’ overwrite into table students;

修改表名字

alter table students rename to student;

添加表字段

alter table student add columns (phone string);

表的删除

dfs -rmr /user/hive/warehouse/my_table;

发表评论

电子邮件地址不会被公开。 必填项已用*标注