【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

相关推荐
实泽有之,无泽虚之15 小时前
MySQL主机因多次连接数据库错误而被阻塞
数据库·sql·mysql
Knight_AL16 小时前
从自然语言到 SQL:为什么向量数据库是更好的选择
数据库·sql
amao998818 小时前
数据库原理与技术 - 3-7 视图和索引 View& Index
数据库·sql·oracle
柒.梧.20 小时前
从原理到实战:Spring AOP全解析
数据库·sql
山峰哥20 小时前
SQL优化中的索引策略与Explain分析实战
大数据·汇编·数据库·sql·编辑器
小鸡脚来咯21 小时前
MySQL索引优化
sql·mysql
醉卧考场君莫笑1 天前
sql基础操作
数据库·sql·oracle
wheeldown1 天前
数据库复习自用
数据库·sql·oracle
qq_13948428821 天前
基于Python网易云排行榜数据分析系统设计与实现
大数据·hadoop·python·django·flask