The
prefix_matchandexact_matchpredicates are used with Patricia trie indexes. They specify prefixes for string values in awhereclause.For more details on the Patricia trie indexes and search methods, see the Patricia trie Indexes page.
Syntax
select * from ... where s prefix_match '123'select * from ... where s exact_match '123'
Examples
create table T(s string); create index idx_s on T(s) using ptree; insert into T(s) values('123'); insert into T(s) values('12345678'); insert into T(s) values('111222333'); select * from T where s prefix_match '123'; s ------------------------------------------------------------------------------ 123 Selected records: 1 select * from T where s prefix_match '12345678'; s ------------------------------------------------------------------------------ 12345678 123 Selected records: 2 select * from T where s exact_match '123'; s ------------------------------------------------------------------------------ 123 12345678 Selected records: 2 select * from T where s exact_match '12345678'; s ------------------------------------------------------------------------------ 12345678 Selected records: 1