Weather Observation Station 11

select distinct city from station
where right(CITY,1) not in ('a','e','i','o','u')
OR
left(CITY,1) not in ('a','e','i','o','u')
Share:

1 comment:

  1. if i am writing the below query its not working and giving an error.

    select distinct city from station
    where city like '[aeiou]%[^aeiou]' OR '[^aeiou]%[aeiou]'

    ERROR:Msg 4145, Level 15, State 1, Server WIN-ILO9GLLB9J0, Line 7
    An expression of non-boolean type specified in a context where a condition is expected, near '[^aeiou]%[aeiou]'.

    ReplyDelete