postgresql拆分文本

unnest(string_to_array('文本',','))

示例:

with orders as (select unnest(string_to_array(${参数1},',')))

select * from analy.test1 where id in (select * from orders)

sql 复制代码
with orders as (select unnest(string_to_array(${参数1},',')))
select * from analy.test1 where id in (select *  from orders)
相关推荐
AIgorithmGEEK6 小时前
MySQL 索引全解(下):建、查、删实战与知识速查表
数据库·mysql·b+树·索引
唠点键盘之外的8 小时前
26 向量数据库实战:从 0 搭一条能用的检索链路(pgvector + Spring AI)
数据库·人工智能·spring
云和恩墨8 小时前
数据库监控简史:监控不止于告警——从图表大爆发到健康管理闭环
数据库
ly76898 小时前
MongoDB 事务开销实测:快照隔离下的写冲突、重试与分片事务边界
数据库·mongodb·事务·分片集群·快照隔离·写冲突
豆角焖肉9 小时前
Spring AOP 自定义注解实现系统操作日志
数据库·自定义注解·springaop·操作日志·aop 切面
金伟API102410 小时前
不会写复杂SQL怎么办?
数据库·sql
执笔为剑10 小时前
2.1.2-1、V8R3迁移到V8R6-Oracle兼容特性
数据库
geovindu10 小时前
sql:Search-Optimized SQL Queries using mysql 9.0
android·数据库·sql·mysql·数据库开发·数据库架构
for_ever_love__11 小时前
MySQL SELECT 与 WHERE 优化实战:可搜索条件、联合索引与执行计划
数据库·mysql·oracle·select·where·条件优化·查询优化技巧
2501_9318037511 小时前
MySQL 锁机制详解
数据库·mysql