Reputation: 85
I have type images (json
) in my db. Its array of strings.
How can I select all rows that images
contains "foo"
?
Upvotes: 1
Views: 3342
Reputation: 222432
Use json_contains()
:
select t.*
from mytable t
where json_contains(images, '"foo"')
Upvotes: 6