【问题标题】:Full-text search with wildcard使用通配符进行全文搜索
【发布时间】:2011-03-23 11:17:09
【问题描述】:

我有一个启用全文搜索的表格。但我无法使用通配符查询表。

select * from products where contains(Description, 'Computer') 返回包含单词“Computer”的行

select * from products where contains(Description, 'Compute*') [replace "r" with "*"] 不返回任何结果

发生了什么事?

【问题讨论】:

标签: search full-text-search


【解决方案1】:

假设 SQL Server,像这样在通配符表达式周围添加双引号

SELECT * 
FROM products 
WHERE contains(Description, '"Compute*"')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-12
    • 2023-03-20
    • 1970-01-01
    • 2010-10-31
    • 1970-01-01
    • 2019-03-08
    相关资源
    最近更新 更多