SQLite Forum

Difference between MATCH('x') and MATCH('x*')
Login
I think the key you're missing from the documentation is that FTS generally operates on tokens:

```
    sqlite> create virtual table example using fts5(content);
    sqlite> insert into example(content) values('x');
    sqlite> insert into example(content) values('xother');
    sqlite> select * from example where content match 'x';
    x
    sqlite> select * from example where content match 'x*';
    x
    xother
    sqlite>
```

The first select query only finds 'x' because that's the only entry with just that token, the other entry doesn't have the token 'x', rather it has the token 'xother'.

The second select query asks for all entries with any token that starts with 'x', so it finds both entries since they both have a token that starts with 'x'.