sqlserver全文索引 contains和freetext 的使用方法

 

Contains

例如,下面语句检索Book表的Title列和Notes列中包含“database”或“computer”字符串的图书名称及其注释信息: 

select title, notes

from book

where contains(tilte, ‘database’) or contains(notes,‘database’)

or contains(title,‘computer’) or contains(notes,‘computer’)

 

freetext

例如,下面语句使用FREETEXT语句搜索Book表中包含“Successful Life”字符串的数据行: 

select title, notes

from book

where freetext(*,‘Successful Life’)

posted on 2014-08-11 14:57  忙碌ing  阅读(1641)  评论(0)    收藏  举报

导航