I want to solve a query challenge: print out all the names of the cities that do not start with a vowel. I used the following condition that was meant only for lower vowels but the MySQL engine was working even for upper case vowels too. Why is that?
Click here to get the sample input.
This is my solution:
select distinct city from station where left(city, 1) not in ('a','e','i','o','u');
I checked the data, there are cities like Arlington
that start with an uppercase vowel but still is getting filtered out by the where clause that only concerns the lowercase vowels.