0

I have a table , let's call it Customer and a FullText Table Customer_t which based on the text in the table that is indexed.

Customer
   ID
   Name
   City

Customer_t
   ID
   SearchText  (just the Name and City put together)

Using Full Text index and the SQlite MATCH term, how do I get a list of all the Customers that match a search in Customer_t. Basically a join, but the join table, which is the search source is a Full Text Index table.

Stuck.

Thanks

4

1 回答 1

1

使用连接:

SELECT *
FROM Customer
JOIN (SELECT ID
      FROM Customer_t
      WHERE SearchText MATCH '...')
USING (ID)

或子查询:

SELECT *
FROM Customer
WHERE ID IN (SELECT ID
             FROM Customer_t
             WHERE SearchText MATCH '...')
于 2013-05-04T07:02:29.743 回答