【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

相关推荐
编程自留地20 小时前
项目sql语句
前端·数据库·sql
2301_8009769321 小时前
数据库的基本操作后续
java·数据库·sql
思麟呀1 天前
Epoll的学习,在select和poll的基础上
网络·数据库·sql·学习·tcp/ip
猫的玖月1 天前
SQL语法简介
数据库·sql·oracle
禹凕1 天前
MYSQL——基础知识(SQL的临时表和克隆表)
sql·mysql
空空潍1 天前
MySQL索引不生效?一文理解CBO成本模型
数据库·sql·mysql
IRevers1 天前
【Agent】基于Langchain的Agent数据库查询助手
数据库·人工智能·pytorch·sql·深度学习·langchain·agent
他是龙5511 天前
DVWA SQL 注入全级别通关笔记(Low / Medium / High / Impossible)
数据库·笔记·sql
treacle田1 天前
达梦数据库-快速装载工具dmfldr-记录总结
数据库·sql·达梦快速装载dmfldr
juniperhan2 天前
Flink 系列第17篇:Flink Table&SQL 核心概念、原理与实战详解
大数据·数据仓库·分布式·sql·flink