您的位置:首页 > 数据库

SQL Server 全文索引

2014-10-26 19:51 176 查看
create table Document(
ID int not null,
Name nvarchar(255) not null,
Body nvarchar(max) not null);
go

create unique index uq_ix_for_Document --#这里一定要加一个not null unique的索引下面会用到。没有这个就不可以加全文索引。
on Document(ID);
go

create fulltext catalog ftt_clg_for_Studio
as default;
go

create fulltext index on Document(Body)
key index uq_ix_for_Document
on ftt_clg_for_Studio;
go --#可以看出全文索引是没有名字的。

------------------------------------------------------------------------------------------------------------------
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: