mssql2005全文索
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]