Take this table.
id | sentence
-------------------
2 | I % cake.
3 | My name is %
You will notice the wildcards are actually in the fields within the database.
With MySQL you can do this :
SELECT id FROM mytable WHERE sentence MATCH 'My name is John';
In this example this would return 3.
So it's like a regular MATCH but in reverse.
My question is can this be done any way in SQLite, because when I try it I get no results. Is there a way to implement it perhaps if not ?
EDIT: Realised I put LIKE instead of MATCH. Apologies.
Aucun commentaire:
Enregistrer un commentaire