本文介绍了如何使用 SQLite FTS3 匹配表中的多列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有一个包含 A、B、C、D 列的表格,我想在 A 列和 C 列上进行匹配
Lets say I have a table with columns A , B , C , D and I want to do a match on column A and C
我看到您可以匹配sqlite中的单个列或所有列
I see that you can either match a single column or all column in sqlite ie
- match column A select * from table where A match 'cat' - match all columns select * from table where table match 'cat'是否可以只匹配 A 列和 C 列?如果没有,你们如何解决这个问题?
Is it possible to match only columns A and C? If not, how do you guys get around this?
感谢您的建议!
推荐答案我认为您不能在单个 FTS 查询中使用多个 MATCH 运算符.使用 column_name:target_term 使用一次全文搜索来搜索多列.
I don't think you can use multiple MATCH operators in a single FTS query. Use column_name:target_term to search multiple columns using one full text search.
SELECT * FROM table WHERE table MATCH 'A:cat OR C:cat'www.sqlite/fts3.html#termprefix
更多推荐
如何使用 SQLite FTS3 匹配表中的多列?
发布评论