这是一个全文索引的一个例子,首先在查询分析器中使用:
e pubs go |
打开数据库全文索引的支持
ute sp_fulltext_database 'enable' go |
建立全文目录ft_titles
ute sp_fulltext_catalog 'ft_titles', 'create' go |
为titles表建立全文索引数据元,UPKCL_titleidind是主键所建立的唯一索引,可由sp_help titles得知
cute sp_fulltext_table 'titles','create', 'ft_titles', 'UPKCL_titleidind' go |
设置全文索引列名
exec sp_fulltext_column 'titles', 'title', 'add' go exec sp_fulltext_column 'titles', 'notes', 'add' go |
建立全文索引
exec sp_fulltext_table 'titles', 'activate' go |
填充全文索引目录
exec sp_fulltext_catalog 'ft_titles', 'start_full' go |
使用contains和freetext
select title, notes from titles where contains(title, '"computer Cooking"') go select title, notes from titles where freetext(title, 'computer Cooking') go select title, notes from titles where freetext(title, '"computer Cooking"') go select title, notes from titles where contains(title, 'computer') go select title, notes from titles where freetext (*, 'computer') go |
(责任编辑:铭铭 mingming_ky@126.com TEL:(010)68476636)
|
|||
| · 51CTO主编推荐经典专题 · RAID——磁盘阵列基础 · 充电计划之热门IT认证.. · 51CTO技术自测 挑战自.. · CISSP认证成长之路 · AMD Phenom三核处理器.. · 国际文档格式标准开战 · 2007年互联网大会 |
· 我是黑客我怕谁——讲.. · ARP攻击防范与解决方案 · Solaris 10 配置管理 · Solaris基础知识入门 · RIP路由协议专栏 · MPLS路由协议专栏 · OSPF路由协议专栏 · 思科路由器产品 |
||
|
|||
| · Java基础教程 · VPN技术 · ARP攻击防范与解决方案 · SQL Server 2005全解 · SOA 面向服务架构 · SQL Server 2005全解 · Java编程开发手册 · RAID——磁盘阵列基础 |
· 三层交换技术专题 · SQL Server入门到精通 · Windows Server 2003企.. · Windows远程桌面应用 · C#技术开发指南 · VPN技术 · Solaris 10 配置管理 · C#技术开发指南 |
||
|
|||
| · ARP攻击防范与解决方案 · VPN技术 · SQL Server 2005全解 · Java基础教程 · SQL Server入门到精通 · SQL Server 2005全解 · SOA 面向服务架构 · Java编程开发手册 |
· C#技术开发指南 · 三层交换技术专题 · C#技术开发指南 · Windows远程桌面应用 · RAID——磁盘阵列基础 · Windows Server 2003企.. · 邮件服务器专题 · wimax技术与趋势 |
||
| ·DB2 Viper快速入门 ·DB2 9数据库的镜像分割与.. |
·将XML应用程序从DB2 8.x.. ·DB2 9中的pureXML:如何.. |
| ·服务器中的“傻瓜机”在.. ·盖茨也喜欢登录Youtube看.. |
· · |
| ·拯救系统管理员 ·美国选民:我为什么选布什 |
·VMware公司中文命名挑战赛 ·我们真缺乏创新吗? |
| ·J0ker的CISSP之路:复习-.. ·J0ker的CISSP之路:复习-I.. |
·9月第3周安全回顾 内网安.. ·教你几招识别和防御Web网.. |
| · NGN:下一代网络 · 网络访问中断大排查 · FTTx光纤接入 |
· 教你使用Anti ARP Sniff.. · 网络嗅探教程:使用Snif.. · 常见病毒手工清除方法大.. |
| · C++是垃圾语言?! · 2007年IT界七大抄袭事件 · Java实用开发全集 |
· 解析Ajax开发框架 走进A.. · 基于Google Maps与Ajax.. · 基于Google Maps与Ajax.. |
| · 热门 IT 培训认证官方资.. · Ubuntu 中文开源频道 · Solaris基础知识入门 |
· 费力不讨好 数据中心主.. · AMD Phenom三核处理器解.. · 51CTO主编推荐经典专题 |
| · 甲骨文Oracle 11g正式发.. · Oracle数据库开发之PL/S.. · Oracle数据库开发基础教.. |
· 存储2006,一个并购的大.. · IDC宣布浪潮蝉联存储市.. · 双机热备技术 |