【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

相关推荐
山峰哥5 小时前
数据库工程核心:SQL调优让查询效率飙升的实战密码
网络·汇编·数据库·sql·编辑器
色空大师6 小时前
mybatis动态sql
sql·mybatis·foreach·where·sql动态语法
zqmattack8 小时前
SQL优化与索引策略实战指南
java·数据库·sql
lang201509289 小时前
Jackson 1.x到2.x的演进与Spring集成
数据库·sql·spring
码农幻想梦9 小时前
实验四 mybatis动态sql及逆向工程
sql·性能优化·mybatis
笃行客从不躺平12 小时前
PG SQL 行转列记录
数据库·sql
知识分享小能手12 小时前
Oracle 19c入门学习教程,从入门到精通,PL/SQL 编程详解:语法、使用方法与综合案例(6)
sql·学习·oracle
山峰哥13 小时前
SQL调优实战:让查询效率飙升10倍的降本密码
服务器·前端·数据库·sql·编辑器·深度优先
無森~13 小时前
Hive概述
数据仓库·hive·hadoop
無森~13 小时前
Hive下载与安装
数据仓库·hive·hadoop