SQL 服务器中的全文搜索未找到我的条目

Full text Search in SQL Server not finding my entries

我的要求是能够在SimranSimrankaure.t.c

中搜索imran

我正在使用以下查询:

select Name, Len(Name)
from Demo 
where Contains(Name, '"*imran*"')

我的 Demo table 有 Name 列,其中包含以下条目 SimranSimrankaurSimranKaurKhurana 但查询 [=29= 】 无。

我哪里做错了?

如果您的数据库不区分大小写,请尝试以下操作

select Name, Len(Name) from Demo 
where Name like '%imran%'

请注意,根据数据库设置,这可能区分大小写, 所以这可能更一致:

select Name, Len(Name) from Demo 
where LOWER(Name) like '%imran%'

听起来像你想要的like:

select Name, Len(Name)
from Demo
where Name like '%imran%';

即使使用contains,也不能在字符串开头使用通配符。