I wrote the following query
x
SELECT UNIQUE
CITY
FROM
STATION
WHERE
(CITY LIKE '%A' OR
CITY LIKE '%E' OR
CITY LIKE '%I' OR
CITY LIKE '%O' OR
CITY LIKE '%U')
ORDER BY
CITY;
What is wrong with this?
Advertisement
Answer
If you want it to work with lower/upper letters, you could use UPPER(CITY)
, otherwise it’s all good.