首页 >php教程 >php手册 >mssql2005全文索

mssql2005全文索

WBOY
WBOY原创
2016-06-06 20:01:151575浏览

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]

 

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn