【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

相关推荐
IvorySQL1 小时前
PG 日报|SQL/PGQ 图查询基于联接重写机制实现
数据库·人工智能·sql·postgresql·区块链·ivorysql
李昊哲小课3 小时前
spark4 集群安装
大数据·hadoop·zookeeper·spark
你有我备注吗7 小时前
SQL学习之查询
java·sql·学习
G.O.G.O.G9 小时前
LeetCode SQL 从入门到精通(MySQL)05(下)
数据库·sql·oracle
buligbulig10 小时前
Hadoop环境安装和集群创建
大数据·hadoop·分布式
G.O.G.O.G12 小时前
《LeetCode SQL 从入门到精通(MySQL)》09
sql·mysql·leetcode
Csvn1 天前
Day 3:LIKE 与模式匹配 — 让查询学会"模糊搜索"
后端·sql
Devlive 开源社区1 天前
Nebula 1.6.0 发布:跨区域桶自动路由、秒传、文本/PDF 预览一次到位
数据库·sql
leonshi1 天前
数据库关联表查询出重复数据的原因分析与解决
sql·重复数据
香山上的麻雀10081 天前
Hive内部表(MANAGED_TABLE)的“批量删除分区”特性详解
数据仓库·hive·hadoop