samedi 24 janvier 2015

Searching Sqlite Database using Exact Keyword

i`m trying to search a Sqlite Database , with this condition : i want to find a string using an Exact Keyword. let me explain this to you . i have 3 rows as follow :



  • catching cold

  • i have a cat

  • two cats was seen in your house yesterday




i want to search these rows with keyword "cat" and i expect this result :



  • i have a cat




i am using this SQL code so far :



Select * FROM MyTable WHERE Mycolumn Like '%cat%'


But Returning Result is All these 3 Rows:



  • catching cold

  • i have a cat

  • two cats was seen in your house yesterday


What can i do to get my expected result?


thank you in advance.


Aucun commentaire:

Enregistrer un commentaire