Unable to search using JSON_CONTAINS

631 views Asked by At

I am using the following query to search for a json value named "JavaScript"

When I run the query I get 0 results

This is my insert command I am using

INSERT INTO admin_acc_mngmt_notes (tags) VALUES('["JavaScript"]')

This is the search query I am using:

SELECT * FROM admin_acc_mngmt_notes WHERE JSON_CONTAINS(tags,'["JavaScript"]');

Any help would be really appreciated!

1

There are 1 answers

0
json6 On

I found out the answer myself:

SELECT * FROM admin_acc_mngmt_notes WHERE JSON_SEARCH(tags, 'all', 'JavaScript') IS NOT NULL