开发者

Full-text search with wildcard

开发者 https://www.devze.com 2023-01-09 21:01 出处:网络
I have a table with full text search enabled. But I can\'t get query the table using wildcard. select * from products where contains(Description, \'Computer\') returns rows with the word \"Computer\"

I have a table with full text search enabled. But I can't get query the table using wildcard.

select * from products where contains(Description, 'Computer') returns rows with the word "Computer"

开发者_Go百科

select * from products where contains(Description, 'Compute*') [replace "r" with "*"] returns nothing

What's going on?


Assuming SQL Server, add double quotes around the wildcarded expression like so

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

精彩评论

暂无评论...
验证码 换一张
取 消