小编sam*_*sam的帖子

在Postgres中将逗号分隔的字符串转换为整数数组

我试图将逗号分隔的字符串转换为整数数组(integer [])以在Where子句中使用.

我试过演员,::Int但没有奏效.感谢您的意见

Table A   |  Table B
ID        |  Set_id
2         |  14,16,17
1         |  15,19,20
3         |  21
Run Code Online (Sandbox Code Playgroud)

我的查询:

Select * 
from Table a, table b 
where a.id in b.set_id
Run Code Online (Sandbox Code Playgroud)

sql arrays postgresql

8
推荐指数
3
解决办法
1万
查看次数

标签 统计

arrays ×1

postgresql ×1

sql ×1