首頁 >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