SQL query to check if a name begins and ends with a vowel

后端 未结 25 1090
臣服心动
臣服心动 2020-11-30 23:16

I want to query the list of CITY names from the table STATION(id, city, longitude, latitude) which have vowels as both their first and last charact

25条回答
  •  执笔经年
    2020-11-30 23:59

    The below query will do for Orale DB:

    select distinct(city) from station where upper(substr(city, 1,1)) in ('A','E','I','O','U') and upper(substr(city, length(city),1)) in ('A','E','I','O','U');
    

提交回复
热议问题