Reputation: 5679
That's my query:
SELECT firstName, lastName FROM users WHERE users MATCH 'firstName:joh*'
I want to get all rows where lastName's length is 1+ (not null)
How should I modify my query?
Upvotes: 1
Views: 307
Reputation: 180010
This cannot be done with FTS; just use a normal expression:
SELECT firstName, lastName
FROM users
WHERE users MATCH 'firstName:joh*'
AND length(lastName) >= 1
(Please note that NULL
and ''
(empty string) are distinct values, and are both excluded.)
Upvotes: 1