We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Weather Observation Station 6
Weather Observation Station 6
Sort by
recency
|
4310 Discussions
|
Please Login in order to post a comment
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%' ;
This might work for MySQL:
SELECT distinct(CITY) FROM STATION where CITY REGEXP '^[aeiou]';
I understood today that in SQL if you write a code with all CAPS then whole code needs to be in CAPS. I got this question right using the following code:
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%';
FOR MySQL
SELECT DISTINCT(CITY) FROM STATION WHERE CITY REGEXP '^[AEIOU]'
DB2: SELECT DISTINCT CITY FROM STATION WHERE UPPER(SUBSTR(CITY,1,1)) IN ('A','E','I','O','U');