sajad torkamani

Suppose you have a table like this:

MySQL: Check if JSON array contains a value

And you want to find all the records where user_types contains the entry "CLIENT". You can do this with the below query:

SELECT *
FROM user
WHERE JSON_CONTAINS(user_types, '"CLIENT"')
Tagged: MySQL