SQLite Params and wildcards
I'm trying to query like this...
SELECT * FROM Urls
WHERE Urls.url LIKE '%' + 'sports' + '%'
The above returns no records, whereas the following does return records.
SELECT * FROM Urls
WHERE Urls.url LIKE '%sports%'
The reason why I want to use the first example is because I'd like to replace 'sports' with a param but when I so so I get no records returned.
开发者_如何学CANSWER:
I just Googled 'sqlite +concatenation' :)
SELECT * FROM Urls
WHERE Urls.url LIKE '%' || 'sports' || '%'
精彩评论