-
-
Save bluesmilery/2f7a650ac2ae66b3fed715147cb12867 to your computer and use it in GitHub Desktop.
hive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 表名为TA | |
# 克隆表,不带数据 | |
create table TA_like like TA | |
# 将本地文件导入表中 | |
load data local inpath '/local/path' into table TA; | |
# 查看建表语句 | |
show create table TA | |
# 删除表 | |
drop table if exists TA | |
# 删除分区 还可以写成pt<xxx,来批量删除 | |
alter table TA drop if exists partition(pt=xxx) | |
# 删除表内所有数据(不删除分区) | |
truncate table TA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment