过滤数据

# The "world" test database is available on the page:
# https://dev.mysql.com/doc/index-other.html
SELECT Name, Population
FROM country
WHERE Continent = 'Asia'


Name Population
Afghanistan 22,720,000
United Arab Emirates 2,441,000
Armenia 3,520,000
Azerbaijan 7,734,000
Bangladesh 129,155,000
Bahrain 617,000
Brunei 328,000
Bhutan 2,124,000
China 1,277,558,000
...

该语句从 country 表中取两列,但不是返回全部行,而只返回 Continent 等于 'Asia' 的行。