We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
hi, I used nearly the same code with you, mine is
SELECT DISTINCT CITY
WHERE LEFT(CITY,1) REGEXP '[aeiou]'
FROM STATION;
but it always returns to me that
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE LEFT(CITY,1) REGEXP '[aeiou]'
FROM STATION' at line 2
Can you tell me what the difference between yours and mine?
btw, is there the 1 in the left(city,1) necessary?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 6
You are viewing a single comment's thread. Return to all comments →
hi, I used nearly the same code with you, mine is SELECT DISTINCT CITY WHERE LEFT(CITY,1) REGEXP '[aeiou]' FROM STATION;
but it always returns to me that ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE LEFT(CITY,1) REGEXP '[aeiou]' FROM STATION' at line 2
Can you tell me what the difference between yours and mine? btw, is there the 1 in the left(city,1) necessary?