daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest May 17th, 2018 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT COUNT(id) as matches
  2. FROM my_table
  3. WHERE my_table.settings = '{ "color": "red", "location": "Australia", "flavour": "cheese" }'
  4.    
  5. SELECT COUNT(id) as matches
  6. FROM my_table
  7. WHERE
  8. JSON_EXTRACT(`settings` , '$.color') = "red"
  9. AND JSON_EXTRACT(`settings` , '$.location') = "Australia"
  10. AND JSON_EXTRACT(`setting`, '$.flavour') = "cheese";
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top