I want to query a record containing a phrase.
for example: I want the search to return the record: ‘The needle in the haystack’ with the search phrase ‘needle haystack’
The query will work if I just have ‘needle’ or just ‘haystack’ using like% in the where clause.
Is there a way to search with the phrase ‘needle haystack’?
Replace
phrasewithLOWER(phrase)if you want the search to be case-insensitive (depends on the DB engine and other things, though).