赞
踩
INSERT INTO table_name [PARTITION (partition_col=value, ...)]
VALUES (value1, value2, ...);
INSERT INTO table_name [PARTITION (partition_col=value, ...)]
SELECT column1, column2, ...
FROM source_table
WHERE condition;
在hive中,没有直接的update语句,可以使用insert overwrite来覆盖原有表数据达到更新的效果
INSERT OVERWRITE TABLE table_name [PARTITION (partition_col=value, ...)]
VALUES (value1, value2, ...);
INSERT OVERWRITE TABLE table_name [PARTITION (partition_col=value, ...)]
SELECT column1, column2, ...
FROM source_table
WHERE condition;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。