Reputation: 721
I'm working on SQLite
and I want use the LIKE
operation in my query and i've used following query
SELECT * from TBL_words where words Like "%ab"
I've more than 10 words which are ends with ab but I'm getting only one word. Am I doing anything wrong? please any one suggest the solution for this, Thanks
Upvotes: 0
Views: 46
Reputation: 152867
LIKE '%ab'
will match columns that end exactly in the chars ab
. Based on comments you have additional trailing whitespace in some of your words
. You can use TRIM(words)
in SQL to remove it.
Upvotes: 1