剔除 HIVE中select除了某些字段之外的剩余所有字段

只需要设置参数
set hive.support.quoted.identifiers=None;
指定要剔除哪个字段
select (剔除的字段)?+.+ from table

示例:
选择tableName表中除了name、id、pwd之外的所有字段:
set hive.support.quoted.identifiers=None;
select (name|id|pwd)?+.+ from tableName;

选择tableName表中除了ds之外的所有字段:
set hive.support.quoted.identifiers=None;
select (ds)?+.+ from tableName;

你可能感兴趣的:(sql,hadoop,sql)