SQLite GLOB operator

The SQLite GLOB operator is similar to the SQLite LIKE operator. The GLOB operator is used to check for matching string patterns. The difference between this operator and the SQLite LIKE operator is that

  • the GLOB operator is case sensitive
  • the GLOB operator uses UNIX wildcards
  • the GLOB operator does not use esapce characters

Exemplary syntax:

SELECT 
  name
FROM
  cars
WHERE 
  type GLOB '*V[6-9]*';

The SQLite SELECT query shown above will return all cars that have V6 – V9 engine (model).