PG 数据库 拼接字段 查询多值

explain select * from pp_batchno pb where exists(select * from unnest(STRING_TO_ARRAY(‘testWax,dd’,‘,’)) col where pb.ie_notice_codes ~* (‘(^|,)’ || col || ‘(,|$)’))

explain select * from pp_batchno pb where exists(select * from unnest(STRING_TO_ARRAY(‘testWax,dd’,‘,’)) col where col=any(STRING_TO_ARRAY(pb.ie_notice_codes,‘,’)))

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注

滚动至顶部