对表列问题进行全文搜索(Full

编程入门 行业动态 更新时间:2024-10-27 22:27:02
对表列问题进行全文搜索(Full-Text search on a table column issue)

我有一个表,我想搜索它的标题(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.

更多推荐

本文发布于:2023-08-05 21:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1440095.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:全文   Full

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!