You are viewing a single comment's thread. Return to all comments →
simplified by taking out the nested SELECT and just replacing it with another REGEXP.
So we have for mySQL:
SELECT DISTINCT city FROM station WHERE city RLIKE '^[aeiou]' AND city RLIKE '[aeiou]$'
RLIKE is just a synonym for REGEXP for those who don't know.
Also, simplified even more by (credit: rshaghoulian):
SELECT DISTINCT city FROM station WHERE city RLIKE '^[aeiou.*aeiou]$'
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 8
You are viewing a single comment's thread. Return to all comments →
simplified by taking out the nested SELECT and just replacing it with another REGEXP.
So we have for mySQL:
SELECT DISTINCT city FROM station WHERE city RLIKE '^[aeiou]' AND city RLIKE '[aeiou]$'
RLIKE is just a synonym for REGEXP for those who don't know.
Also, simplified even more by (credit: rshaghoulian):
SELECT DISTINCT city FROM station WHERE city RLIKE '^[aeiou.*aeiou]$'