Checking for a Range of Values

Filtering Data

SELECT Name, Population
FROM country
WHERE Population BETWEEN 100000000 AND 1000000000


Name Population
Bangladesh 175,686,899
Brazil 212,812,405
Democratic Republic of the Congo 112,832,473
Egypt 118,365,995
Ethiopia 135,472,051
Indonesia 285,721,236
Japan 123,366,734
Mexico 131,946,900
...

When BETWEEN is used, two values must be specified: the low end and high end of the desired range. The two values must also be
separated by the AND keyword. BETWEEN matches all the values in the range, including the specified start and end values.