小智 8
截断:
hive -e "TRUNCATE TABLE IF EXISTS $tablename"
Run Code Online (Sandbox Code Playgroud)
下降:
hive -e "Drop TABLE IF EXISTS $tablename"
Run Code Online (Sandbox Code Playgroud)
使用以下命令删除Linux环境中的所有表.
hive -e 'show tables' | xargs -I '{}' hive -e 'drop table {}'
Run Code Online (Sandbox Code Playgroud)