【Hive-SQL】Hive Select 选择语句排除一列或多列

  • 查看除了sample_date以外的所有字段信息
sql 复制代码
set hive.support.quoted.identifiers=none; 

select `(sample_date)?+.+` 
from `test`.`table` where sample_date='20230713';
  • 查看除了sample_date 和 msgtype以外的所有字段信息
sql 复制代码
set hive.support.quoted.identifiers=none; 

select `(sample_date|msgtype)?+.+` 
from `test`.`table` where sample_date='20230713';

上面的 set hive.support.quoted.identifiers=none; 可以替换操作:

'hive-site.xml' 中添加以下配置:
hive.support.quoted.identifiers=none

相关推荐
~ 小团子1 小时前
每日一SQL 【各赛事的用户注册率】
数据库·sql
小袁拒绝摆烂2 小时前
SQL开窗函数
android·sql·性能优化
~ 小团子2 小时前
每日一SQL 【每月交易 I】
数据库·sql
%Leo7 小时前
SQL判断先判断条件1是否符合,条件1不符合再判断条件2
数据库·sql
程序媛_8 小时前
【JMeter】执行SQL
数据库·sql·jmeter
He.ZaoCha9 小时前
多表查询-4-外连接
数据库·sql·mysql
张璐月12 小时前
mysql 散记:innodb引擎和memory引擎对比 sql语句少用函数 事务与长事务
数据库·sql·mysql
天上掉下来个程小白18 小时前
MybatisPlus-06.核心功能-自定义SQL
java·spring boot·后端·sql·微服务·mybatisplus
熊猫钓鱼>_>1 天前
Hadoop 用户入门指南:驾驭大数据的力量
大数据·hadoop·分布式