先上表
1.WHERE 的例子
列出所有加拿大Canadian
城市的信息(包括所有字段)
代码:
SELECT *
FROM North_american_cities
WHERE Country = "Canada";
2.
SELECT *
FROM North_american_cities
WHERE Country = "Mexico"
ORDER BY Population DESC
LIMIT 2
代码:
SELECT *
FROM North_american_cities
WHERE Country = "United States"
ORDER BY Population DESC
LIMIT 2 OFFSET 2