我有一个具有特定列的表,其中有一个列包含逗号分隔值,如test,exam,result,other.
我将一个字符串,如result,sample,unknown,extras作为参数传递给存储过程.然后我想通过检查此字符串中的每个短语来获取相关记录.
例如:
表A
ID Name Words
1 samson test,exam,result,other
2 john sample,no query
3 smith tester,SE
Run Code Online (Sandbox Code Playgroud)
现在我想搜索结果,样本,未知,额外内容
然后结果应该是
ID Name Words
1 samson test,exam,result,other
2 john sample,no query
Run Code Online (Sandbox Code Playgroud)
因为在第一个记录结果匹配和第二个记录样本匹配.