-- 选择数据库
use db;
-- 增加一列
alter table xxx add columns (user_name string);
-- 将增加的列放到某一列后面
alter table xxx change column user_name user_name string after user_id;
-- 将增加的列放到第一列位置
alter table xxx change column user_name user_name string first;
hive 指定位置增加一列
最新推荐文章于 2025-04-06 18:22:36 发布