Quantcast
Channel: Is there a method to check if an array includes one value in SQLite? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Is there a method to check if an array includes one value in SQLite?

$
0
0

Let's say, we have this SQLite table with id=number and tags=text:

| id   | tags                |  | ---- | ------------------- |   | 1    | ["love","sadness"]  |    | 2    | ["love"]            |   | 3    | ["happiness","joy"] |

Is there a way to only return the rows which their cells tags include "love" for example,like this command in MySQL : SELECT * from my_table WHERE JSON_CONTAINS(tags, '"love"') in SQLite.

I use this with the library sql.js wtih node.js


Viewing all articles
Browse latest Browse all 3

Trending Articles