SELECT DISTINCT CITY FROM STATION WHERE City LIKE 'a%' Union SELECT DISTINCT CITY FROM STATION WHERE CITY LIKE 'e%' Union SELECT DISTINCT CITY FROM STATION WHERE CITY LIKE 'i%' Union SELECT DISTINCT CITY FROM STATION WHERE CITY LIKE 'o%' Union SELECT DISTINCT CITY FROM STATION WHERE CITY LIKE 'u%';regexp :
select distinct city from station where city regexp '^[aeiou]';Podrías usar OR para esto.
SELECT DISTINCT CITY FROM STATION WHERE City LIKE 'a%' OR City LIKE 'e%' OR City LIKE 'i%' OR City LIKE 'o%' OR City LIKE 'u%';SQL donde las cláusulas pueden tener múltiples condiciones :
SELECT DISTINCT city FROM station WHERE city LIKE 'a%' OR city LIKE 'e%' OR city LIKE 'i%' OR city LIKE 'o%' OR city LIKE 'u%';Además, dado que solo le importan los comienzos, puede cambiar a una coincidencia substr :
SELECT DISTINCT city FROM station WHERE substr(city,1,1) IN ('a','e','i','o','u'); Aunque tenga en cuenta que si la city tiene un índice, esto puede tener menos rendimiento (requiere un escaneo completo de la tabla)