欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

mssql2005全文索

程序员文章站 2023-12-22 11:34:04
...

sp_fulltext_database 'enable' --启动该数据库全文索引 GO CREATE FULLTEXT CATALOG [dbfulltest] IN PATH N'e:/soft' --创建全文索引目录 GO CREATE FULLTEXT INDEX ON [dbo].[t_role] KEY INDEX [IX_t_role] ON [dbfulltest] WITH CHANGE_TRACKING AUTO -

sp_fulltext_database 'enable' --启动该数据库全文索引

GO

CREATE FULLTEXT CATALOG [dbfulltest]

IN PATH N'e:/soft' --创建全文索引目录

GO

CREATE FULLTEXT INDEX ON [dbo].[t_role] KEY INDEX [IX_t_role]

ON [dbfulltest] WITH CHANGE_TRACKING AUTO --创建全文唯一键

GO

ALTER FULLTEXT INDEX ON [dbo].[t_role] ADD ([r_name]) --添加字段

GO

ALTER FULLTEXT INDEX ON [dbo].[t_role] ENABLE

GO

ALTER FULLTEXT INDEX ON [dbo].[t_role] DISABLE

GO

select * from t_role

select * from t_role WHERE FREETEXT(r_name,'"专员"')

--删除全文索引

ALTER FULLTEXT INDEX ON [dbo].[t_role] DISABLE

GO

DROP FULLTEXT INDEX ON [dbo].[t_role]

GO

DROP FULLTEXT CATALOG [dbfulltest]

上一篇:

下一篇: