create table book (title char(100) not null,notes varchar(1000))
--索引
create unique index pk_title on book(title)
----插入数据
insert into book(title,notes) values ('SQL Server','SQL Server Thanks for the information.I will contact you later, if the AP team needs any information regarding the job.')
--execute sp_fulltext_database 'AllSearch'--建立全文目录ft_pubs
execute sp_fulltext_catalog 'ft_test','create'--为titles表建立全文索引数据元,pk_title为book表中由主键所建立的唯一索引,此参数必须。
execute sp_fulltext_table 'book','create','ft_test','pk_title'--设置全文索引列名
execute sp_fulltext_column 'book','title',' add'
execute sp_fulltext_column 'book','notes','add'--建立全文索引
execute sp_fulltext_table 'book','activate'
--填充全文索引目录
execute sp_fulltext_catalog 'ft_test','start_ full'
select title from book where notes like '%Server%'
select title from book where contains(title,'Server')以前在社区中看过一个帖子也出现过这种现象,但不知道解决办法,哪位遇到过这种问题?
解决办法????
--索引
create unique index pk_title on book(title)
----插入数据
insert into book(title,notes) values ('SQL Server','SQL Server Thanks for the information.I will contact you later, if the AP team needs any information regarding the job.')
--execute sp_fulltext_database 'AllSearch'--建立全文目录ft_pubs
execute sp_fulltext_catalog 'ft_test','create'--为titles表建立全文索引数据元,pk_title为book表中由主键所建立的唯一索引,此参数必须。
execute sp_fulltext_table 'book','create','ft_test','pk_title'--设置全文索引列名
execute sp_fulltext_column 'book','title',' add'
execute sp_fulltext_column 'book','notes','add'--建立全文索引
execute sp_fulltext_table 'book','activate'
--填充全文索引目录
execute sp_fulltext_catalog 'ft_test','start_ full'
select title from book where notes like '%Server%'
select title from book where contains(title,'Server')以前在社区中看过一个帖子也出现过这种现象,但不知道解决办法,哪位遇到过这种问题?
解决办法????
以前在另一台服务器上没有错,,现在换成打了sp4补丁的sql上出错,,是不是打了sp4原因,要另外的写法呢??
execute sp_fulltext_table 'book','activate'
--填充全文索引目录
execute sp_fulltext_catalog 'ft_test','start_ full'
gowaitfor delay '00:05:00' -- 等5分钟再检索数据, 一般就没有问题, 立即检索很少有能检索出数据的
go
select title from book where notes like '%Server%'
select title from book where contains(title,'Server')