PostgreSQL数组查询是否存在某个值

语法

sql 复制代码
值 = =ANY (字段);

例子

查询ids中包含id=5的数据

sql 复制代码
select * from student where 5 = ANY (ids)
  • mybatis
xml 复制代码
select * from student where
#{id} = ANY (ids)
相关推荐
zhangyifang_0093 小时前
PostgreSQL一些概念特性
数据库·postgresql
IT 小阿姨(数据库)18 小时前
PostgreSQL 之上的开源时序数据库 TimescaleDB 详解
运维·数据库·sql·postgresql·开源·centos·时序数据库
知其然亦知其所以然1 天前
这波AI太原生了!SpringAI让PostgreSQL秒变智能数据库!
后端·spring·postgresql
Zhao_yani1 天前
Apache Drill 连接 MySQL 或 PostgreSQL 数据库
数据库·mysql·postgresql·drill
切糕师学AI2 天前
SQL中的函数索引/表达式索引
数据库·sql·mysql·postgresql·oracle
mpHH2 天前
postgresql pg_upgrade源码阅读--doing
数据库·postgresql
IvorySQL3 天前
你真的知道你正在运行哪个 PostgreSQL吗?
数据库·postgresql
best_virtuoso3 天前
PostgreSQL CTE与临时表的概念与区别
数据库·postgresql
海边夕阳20064 天前
PostgreSQL性能调优:解决表膨胀、索引碎片和无效索引问题
数据库·经验分享·postgresql·性能优化
IvorySQL4 天前
使用 PostgreSQL 时间点恢复(Point-In-Time Recovery)的多种数据恢复技术
数据库·postgresql