less than 1 minute read

Weather Observation Station 7

Query the list of CITY names ending with vowels (a, e, i, o, 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-zA-Z]*[a|e|i|o|u]$');

방법2 LIKE 이용

SELECT DISTINCT(CITY)
FROM STATION
WHERE CITY LIKE '% %a' or CITY LIKE '% %e' or CITY LIKE '% %e' or CITY LIKE '% %i' or CITY LIKE '% %u' or CITY LIKE '%a' or CITY LIKE '%e' or CITY LIKE '%i' or CITY LIKE '%o' or CITY LIKE '%u';

Tags:

Categories:

Updated:

Comments