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)
相关推荐
考虑考虑2 小时前
数据库中的EXISTS
运维·数据库·后端
Wang's Blog3 小时前
Java框架快速入门: Spring Security+OAuth2之数据库和实体类的RBAC改造
java·数据库·spring
梦想平凡4 小时前
百游棋牌源代码开发搭建教程(十):隔离部署、备份恢复与双端验收
java·前端·javascript·数据库·源代码管理
xcLeigh4 小时前
让大模型长出手脚,自己写SQL查数据库(Function Calling初探)
数据库·人工智能·sql·时序数据库·timechoai
yume_sibai5 小时前
06-Rust Web 开发实战(Axum 框架 + 数据库 + JWT 认证 + 中间件 + 部署)
前端·数据库·rust
AugustRed6 小时前
Neo4j 图数据库原理 + 应用场景简单介绍
数据库·neo4j
Gl�ria6 小时前
Redis 高可用架构对比
数据库·redis
IpdataCloud7 小时前
高可用的IP数据接口平台有哪些?从可用性、P99延迟到离线部署的评估框架(含代码)
数据库·tcp/ip·ip
呆萌很7 小时前
MySQL 数据库和表的管理操作(命令行)
数据库·mysql
IvorySQL8 小时前
当PostgreSQL“听懂”MySQL——协议兼容层的设计与实战
数据库·人工智能·postgresql