On our PostgreSQL Database we have a field called Description. As you can guess this Description contains a lot of text and we would like to look inside this descriptions to find a certain word.
We tried contains and Charindex function but both are not working...
Any Idea how we can solve this?
Thank you very much!
You can use regular expressions with word delimiter markers:
select * from table where description ~ ('\m' || 'yourword' || '\M');
~* instead of
~ for case insensitive searches.
Note that using description LIKE '%yourword%' as @JNevill suggests will find that your word within other words as well, e.g.
'Jean-Luc Picard' LIKE '%car%' is true.