DISTINCT matching part of a string

Hello MySQLers !

I have a scenario, where I have to search a mysql table for a given word.

Now, the column that will be searched have 1 sentence. I only want to get only the DISTINCT MATCHING WORD out of the sentence.

For example, see the below strings:

  1. Quick brown fox
  2. Blue Crown
  3. Own a house

Now, I want to get following if I search for “Own”

  1. brown
  2. crown
  3. Own

Please let me know how is that possible.

Best Regards
SZH

use a simple LIKE expression, return the entire column

let the application language (php or whatever) isolate the word it was found in

Okay, thats what I am doing at the moment, I thought it will be better if there is a way in MySQL so do it. But since the Master (You) suggested to do it at application level that must be the best option.

Thanks Sir !

SZH