I wrote the following query
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?
I think you can use REGEXP_LIKE
like this:
SELECT UNIQUE CITY
FROM STATION
WHERE REGEXP_LIKE(CITY, '[AaEeIiOoUu]$')
ORDER BY CITY;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With