postgres 查询之where条件,字段的值是列表中的任意一个
select * from stock_move_line where id = any('{5447,5448}');
- any 这种写法一般多用于函数中,比如将某个字段的值拆分为列表
- 感觉这种语法完全可以用
in
来代替.
本文来自博客园,作者:那时一个人,转载请注明原文链接:https://www.cnblogs.com/qianxunman/p/13209857.html
select * from stock_move_line where id = any('{5447,5448}');
in
来代替.本文来自博客园,作者:那时一个人,转载请注明原文链接:https://www.cnblogs.com/qianxunman/p/13209857.html