特牛生活网

Hive中删除表数据的几种方式_hive清除表数据-CSDN博客

网友收藏
文章浏览阅读2.4w次,点赞8次,收藏51次。在内部表中仅删除表中数据,保留表结构方法一truncate table 表名;(truncate用于删除所有的行,这个行为在hive元存储删除数据是不可逆的)truncate 不能删除外部表!因为外部表里的数据并不是存放在Hive Meta store中方法二或delete from 表名 where 1 = 1 ; (delete用于删除特定条件下的行,使用where 1=1 删除所有行 SQL中where 1 = 1 的使用)在外部表中insert ove..._hive清除表数据