1条回答
默认
最新
回答交流
Markdown
请输入正文
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~

如何检查子字符串是否在 Postgres 中的任何数组值中?
postgres=# select 'aa' = any(string_to_array('aa,bb,cc,dd',',')); ?column? ---------- t (1 row) postgres=# select 'bb' = any(string_to_array('aa,bb,cc,dd',',')); ?column? ---------- t (1 row) postgres=# select 'cc' = any(string_to_array('aa,bb,cc,dd',',')); ?column? ---------- t (1 row) postgres=# select 'abc' = any(string_to_array('aa,bb,cc,dd',',')); ?column? ---------- f (1 row)
复制