SQL Server Full text search Contains function

pvcm50d1  于 2023-03-17  发布在  SQL Server
关注(0)|答案(2)|浏览(126)

İ have a problem with contains function, when i search with like '%ZAM%' operator, it finds all word that contains ZAM like ZAMANLAMA AZAMI ZAM and etc.. but when I use fts index contains function, it just find ZAM ZAMANLAMA but it doesnt find AZAMI or 123ZAM789. I have also tried CONTAINS (YourColumn, ' "ZAM" ' ) but it doesn't work. Please help me , fts is very fast but it could not find all contains like '%%' operator what should I do ?

qgelzfjb

qgelzfjb2#

You can use "*" before in contain syntax same as like operator . but you need to use double quote before and after the search string. Try this query once.

SELECT *
FROM YourTable
WHERE CONTAINS(YourColumn,'"*ZAM*"');

(OR)

select * from YourTable where YourColumn like '%ZAM%'

相关问题