用語集をつくったり、ポップアップで用語解説を載せる場合に、テキストのはいっているカラムと用語の入っているカラムを結合させることができなければなりません。
そういう時にmysqlだったらlikeを使う。
select a.text,w.word,w.content from
(select text from `text`) as a
left outer join
(select word,content,CHAR_LENGTH( word ) AS len_w from T_WORD order by len_w desc) as w
ON a.text LIKE concat('%',w.word,'%')
単語の長いものを優先するために
CHAR_LENGTH( word ) と order by len_w desc を入れている。
単語の部分一致を行っている。
ON a.text LIKE concat('%',w.word,'%')