总而言之,我想要
select * from test.population where Number in (1,2,3)
,
但我想要一个返回 json 数组的函数来代替 (1,2,3)。所以我想让它像这样工作。
select * from test.population where Number in ('[1,2,3]')
如何将 json-array 放入 where it 子句中?
最佳答案
您可以使用MEMBER OF
运算符:
Number member of ('[1,2,3]')
关于mysql - 如何在 MySQL 中选择其值位于 json 数组中的列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59343223/