zoukankan      html  css  js  c++  java
  • sqlserver 2005 fulltext 的创建和使用

    --前提如果sqlserver 2005 express 需要下载 SQLEXPR_ADV.EXE。安装Full-Text支持

    --安装完了,FullText Search在Sqserver configuration Manager中的三个服务

    中的Sql Server FullText Search中的账户 Log on as "Local System"

    在查询分析器中

    安下面步骤

    --打开数据库

    user donab

     --打开全文索引支持,启动SQL Server的全文搜索服务

    execute sp_fulltext_database 'enable'

    --建立全文检索目录donba_fulltext

    execute sp_fulltext_catalog 'donba_fulltext', 'create','F:"donbafulltext'

    为Title列建立全文索引数据元,ProductID为Product表中由主键所建立的唯一索引,这个参数是必需的。

    execute sp_fulltext_table 'Product','Create','donba_fulltext','ProductID'

    --设置全文索引列名

    execute sp_fulltext_column 'Product', 'Name', 'add'

    execute sp_fulltext_column 'Product','Summary', 'add'

    execute sp_fulltext_column 'Product','Description', 'add'


    --建立全文索引

    execute sp_fulltext_table 'Product', 'activate'

    --填充全文索引目录

    execute sp_fulltext_catalog 'donba_fulltext', 'start_full'

    --至此,全文索引建立完毕。

    --查询
    select [productid],[Name],[Description] from Product where contains(Name,'"IBM" and "thinkpad" and "A21"')


    --select c1 from ftstable where contains(*,'"apples" and "oranges"')
  • 相关阅读:
    线程带参数操作
    静态页面不识别include
    当网站遭遇DDOS攻击的解决方案及展望
    带进度条上传控件
    用js实现了表格数据管理的以下几个功能:
    怎么面试一个人
    map的使用
    在Axapta中实现trim函数
    Axapta财务过账分析(一)
    在Axapta中实现split函数
  • 原文地址:https://www.cnblogs.com/guola/p/1376833.html
Copyright © 2011-2022 走看看