我已经成功地FTS
在我们存储药物名称的列上创建了一个索引,例如:
Amoxicillin 250mg capsules 21 capsule
Verapamil 160mg tablets 100 tablet
Run Code Online (Sandbox Code Playgroud)
当我搜索参数 Amoxicillin
或tablets
它工作正常。
但是当我搜索'%Amoxi%'
或blets
它没有想出答案时。但是,相同的关键字与Like
运算符一起使用。
select * from AMPP as a
WHERE Contains(A.[NM] ,'%Amoxici%')
Run Code Online (Sandbox Code Playgroud)
以上查询没有结果。但是下面的查询在结果中返回 140 行。
select * from AMPP as a
WHERE Contains(A.[NM] ,'%Amoxicillin%')
select * from AMPP as a
WHERE a.nm like '%Amoxici%'
Run Code Online (Sandbox Code Playgroud)