Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT COUNT(id) as matches
- FROM my_table
- WHERE my_table.settings = '{ "color": "red", "location": "Australia", "flavour": "cheese" }'
- SELECT COUNT(id) as matches
- FROM my_table
- WHERE
- JSON_EXTRACT(`settings` , '$.color') = "red"
- AND JSON_EXTRACT(`settings` , '$.location') = "Australia"
- AND JSON_EXTRACT(`setting`, '$.flavour') = "cheese";
Add Comment
Please, Sign In to add comment