Created
October 7, 2017 18:37
-
-
Save wouldhide/dcf94bbda63723d4c2162ebde5528c45 to your computer and use it in GitHub Desktop.
Search in MySQL JSON field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# select `name` from tags; | |
# {"en": "Lorem Ipsum", "hu": "Lorem Ispsum"} | |
select JSON_EXTRACT(`name`, "$.en") as `name` | |
from tags | |
where lower(JSON_EXTRACT(`name`, "$.en")) like "%ipsum%"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment