SQL 2005全文索引

Posted on 2007-12-26 12:11 Lemo 阅读(771) 评论(0)  编辑 收藏 引用

use text;  //进入数据库
execute sp_fulltext_database 'enable';//打开全文索引
execute sp_fulltext_catalog 'ft_test','create'// 创建全文索引
execute sp_fulltext_table 'mx_news_from','create','ft_test','key_index';//
execute sp_fulltext_column 'mx_news_from','mxtitle','add';
execute sp_fulltext_table 'mx_news_from','activate';
execute sp_fulltext_catalog 'ft_test','start_full';

//执行 查看一下全文索引

select mxtitle
from mx_news_from where contains(mxtitle,'梦想')

select mxtitle
from mx_news_from
where freetext(*,'梦想')

Select fulltextserviceproperty('IsFullTextInstalled')  //查看是否安全全文索引组件


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


posts - 6, comments - 6, trackbacks - 0, articles - 0

Copyright © Lemo