我有一张如下表:
TABLE1
No Description
1 Hello Hai Hello
2 Good Bad Good
3 Hello Good Hai
4 Hai Hello Bad
5 Hello Hello Hello
现在,如果我运行以下查询:
Select *
from TABLE1
where Description like '%Hai%'
OR Description like '%Hello%'
OR Description like '%Good%'
我希望结果如下(通过添加一个额外的列“FIRST MATCHED WORD”):
No Description First Matched Word
1 Hello Hai Hello Hai
2 Good Bad Good Good
3 Hello Good Hai Hai
4 Hai Hello Bad Hai
5 Hello Hello Hello Hello
听到我的意图是找出第一个匹配的单词取决于我们的查询。请帮助我。