基于自由文本搜索(用户输入的多个单词)
问题描述:
基于用户在搜索文本框中输入的全文,我想搜索我的tbl_products表的各个列中存在的每个单词如何实现这一点。我更喜欢使用contains而不是like.plz帮助我。欢迎使用示例而不是链接plz help
Based on the full text entered by user in "search" textbox , i want to search every words that is present in various columns of my tbl_products table how to achieve this.i prefer to use contains than like.plz help me. Examples are welcomed than links plz help
答
您可以搜索超过1列的内容
You can search in more than 1 column like that
FREETEXTTABLE(tablename, (col1,col2,col3,....), 'YourExpression')
请参阅以下链接
SQL SERVER - 2008 - 创建全文目录和完整版文本搜索 [ ^ ]
http://technet.microsoft.com/en-us/library/ms176078.aspx [ ^ ]
希望这可以帮助你...
Refer the following links
SQL SERVER - 2008 - Creating Full Text Catalog and Full Text Search[^]
http://technet.microsoft.com/en-us/library/ms176078.aspx[^]
Hope this helps you...