我有一个表,我想搜索它的标题(nvarchar(max))列。
但是当我在标题列上创建索引时出现错误,因此我可以启用全文搜索。
我将使用Contains关键字来完成这项工作。
有任何想法吗?
谢谢,
I have a Table that I want to search its title(nvarchar(max)) column.
But I am getting an error when I create an index over the title column so I can enable Full Text search on it.
I am going to use the Contains keyword to do the job.
Any ideas?
Thanks,
最满意答案
你在评论中说
当我在列标题上创建索引时,我收到一条错误,指出您无法在此类型的列上创建索引
这听起来像是你试图在它上创建一个常规索引而不是全文索引。 右键单击SSMS中的表,然后选择“全文索引”以设置全文索引。
如果此选项显示为灰色,则可能需要先运行exec sp_fulltext_database 'enable' 。
You say in the comments
When I create the index over the column Title, I get an error stating that you cannot create an index over a column of this type
This sounds like you are trying to create a regular index on it not a full text index. Right click the table in SSMS and choose "Full Text Index" to set up full text indexing.
If this option is greyed out you might need to run exec sp_fulltext_database 'enable' first.
更多推荐
发布评论