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.
Weather Observation Station 6
Weather Observation Station 6
Sort by
recency
|
4934 Discussions
|
Please Login in order to post a comment
/* Enter your query here. */ select distinct CITY from STATION where CITY like "a%" or CITY like "e%" or CITY like "i%" or CITY like "o%" or CITY like "u%";
/* SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '^[aeiouAEIOU]'
What ^ and $ mean in regex
^ → anchors the match to the start of the string.
$ → anchors the match to the end of the string.
So:
^A → means the string starts with A.
A$ → means the string ends with A.
^A$ → means the string is exactly just "A", no more, no less.
What [] means
Square brackets [...] let you define a set of characters.
The regex will match any one character from inside the brackets.
[abc] → matches a, b, or c (just one character).
"cat" (matches c)
"bat" (matches b)
"dog" (no match at first character).
[0-9] → matches any single digit from 0 to 9.
[A-Z] → matches any uppercase letter.
[a-zA-Z] → matches any uppercase or lowercase letter. */
SELECT DISTINCT CITY FROM STATION WHERE CITY LIKE 'A%' OR CITY LIKE 'E%' OR CITY LIKE 'I%' OR CITY LIKE 'O%' OR CITY LIKE 'U%';
select distinct city from station where city like 'a%' or city like 'e%' or city like 'i%' or city like 'o%' or city like 'u%';
For MySQL