mysql does sentence contain word
snippet in sql

mysql does sentence contain word

user1619

#select rows where myColumn has the actualy word (not just the string)
#ie: the word has a space on one side of it
SELECT * FROM myTable WHERE myColumn  
like 'myWord' 
or myColumn like  'myWord %'
or myColumn like '% myWord'
or myColumn like '% myWord %';

mysql does sentence contain word

user2771

SELECT *
FROM myTable 
WHERE myColumn REGEXP '[[:<:]]myword[[:>:]]'