0

In case of a query in MySQL which queries for the name of cities which start and end with vowels from a table 'Station':

SELECT CITY FROM STATION WHERE CITY REGEXP'^[AEIOU].*[aeiou]$';

What does the '.*' do?

1 Answers1

0

.* is any character 0 or more times. Dot means any character and asterisk is a quantifier - zero or more times. This allows optional any characters 0+ times between start and end vowels. Without .* only start uppercase vowel and end lowercase vowel is allowed in the CITY.

leftjoin
  • 36,950
  • 8
  • 57
  • 116