less than 1 minute read

Weather Observation Station 6

Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates.

The STATION table is described as follows:

방법1 정규표현식 이용

SELECT DISTINCT(CITY)
FROM STATION
WHERE REGEXP_LIKE(CITY, '^[A,E,I,O,U]');

방법2 LIKE 이용

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

Tags:

Categories:

Updated:

Comments