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 doesn’t contain the entry "CLIENT". You can do this with the below query:

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

Leave a comment

Your email address will not be published. Required fields are marked *