使用 OR 运算符

过滤数据

SELECT Name, Population
FROM country
WHERE
    Population > 100000000 OR
    Population BETWEEN 1 AND 2000


Name Population
Bangladesh 175,686,899
Brazil 212,812,405
Cocos (Keeling) Islands 600
China 1,406,585,000
Democratic Republic of the Congo 112,832,473
Egypt 118,365,995
Ethiopia 135,472,051
Falkland Islands 2000
Indonesia 285,721,236
...

WHERE 子句中的 OR 关键字表示:满足其中任意一个条件的行都会被取出。