L
L
LXSTVAYNE2021-01-07 16:28:35
Python
LXSTVAYNE, 2021-01-07 16:28:35

How to check SQL lite intersection?

There are such lines: 'eng, anime' and 'eng, history' their intersection returns True. How do I make a query in SQL lite with an intersection check? 'eng, anime' and 'rus, history' must return False

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
devdb, 2021-01-07
@lxstvayne

SELECT * FROM memes WHERE tags LIKE "%anime%" OR tags LIKE "%eng%"

In this case, if the tags field of the entry contains "anime" or "eng", then such an entry will be displayed in the list of found ones.
And if it doesn't, it won't be on the list. Is this the intersection you want?
Read more about how to correctly format tags in the tags field of the memes table here

E
Ernest Faizullin, 2021-01-07
@erniesto77

Join

V
Vladimir Korotenko, 2021-01-07
@firedragon

Damn, I don't understand what the intersection is. Do strings start with one substring? Then select this substring and use like

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question