Sql2008 全文索引 简明教程

匿名 (未验证) 提交于 2019-12-03 00:40:02
 

1. CONTAINS 

  1. SELECT *
  2. FROM dbo.Business
  3. WHERE CONTAINS(Address,‘旅游‘)

2. FREETEXT

  1. 01.select *
  2. 02.from dbo.Business
  3. 03.where freetext(Address,‘带婴儿旅游‘)

3.CONTAINSTABLE

  1. SELECT *
  2. FROM Business AS FT_TBL
  3. INNER JOIN CONTAINSTABLE(Business, *, ‘ISABOUT (婴儿 WEIGHT (.8),赤水 WEIGHT (.4) )‘)
  4. AS KEY_TBL ON FT_TBL.BusinessId = KEY_TBL.[KEY]
  5. ORDER BY KEY_TBL.RANK DESC
 

4. FREETEXTTABLE

  1. SELECT * ,
  2. BusinessID ,
  3. Address
  4. FROM Business AS FT_TBL
  5. INNER JOIN FREETEXTTABLE(Business, Address, ‘ISABOUT (带婴儿旅游 WEIGHT (.8),赤水 WEIGHT (.4) )‘)
  6. AS KEY_TBL ON FT_TBL.BusinessId = KEY_TBL.[KEY]
  7. ORDER BY KEY_TBL.RANK DESC
 
 

原文:https://www.cnblogs.com/cuihongyu3503319/p/9273073.html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!