Postgresql、Pgsql数组类型取交集方法,数组类型满足一个即匹配
1、字符串的155,111转为数字类型
select *
from table_name
where id = 140052
and colum && array ['155','111']::integer[];
2、直接就是数字数组查询
select *
from table_name
where id = 140052
and colum && array [155,111];
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
评论已关闭