Skip to content
Advertisement

SQLite String start with first 6 letters in alphabet table

I need to select the name strings that the first character to be on of A to F or a to f, here is my select clause, but I got noting returned.

SELECT name FROM pet WHERE lower(name) LIKE '[A-Fa-f]%';

Advertisement

Answer

You could use the GLOB operator here:

SELECT name
FROM pet
WHERE name GLOB '[A-Fa-f]*';
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement