Is there a function for MySQL that will count the number of times a string occurs in another string or column? Basically I want:
SELECT SUB_COUNT(\'my wo
Depends what you mean by "string occurs" - as a substring or as full value?
Full value case:
SELECT COUNT(*) FROM my_table WHERE my_column = 'my word';
Substring case:
SELECT COUNT(*) FROM my_table WHERE my_column LIKE '%my word%';