Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by Shawn for Is there a method to check if an array includes one value in SQLite?

If your version of sqlite has the JSON1 extension compiled in:

SELECT *FROM my_tableWHERE EXISTS (SELECT 1 FROM json_each(tags) WHERE value = 'love')ORDER BY id;

will return

id  tags               --  -------------------1   ["love","sadness"] 2   ["love"]           

Viewing all articles
Browse latest Browse all 3

Trending Articles