Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

134
Vistas
More Simplified query for this?
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%';
over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

You would use regexp:

select distinct city
from station
where city regexp '^[aeiou]';
over 4 years ago · Santiago Trujillo Denunciar

0

You could use OR for this.

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%';
over 4 years ago · Santiago Trujillo Denunciar

0

SQL where clauses can have multiple conditions:

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%';

Further, since you only care about starts with, you can switch to a substr match:

SELECT DISTINCT city
FROM station
WHERE substr(city,1,1) IN ('a','e','i','o','u');

Although note if city has an index on it this may be less performant (requiring a full table scan)

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda