题目

3.Review 复习 SELECT 查询
3.Review 复习 SELECT 查询

答案

  1. select city , population from north_american_cities where country like ‘%canada%’; 或者 SELECT city, population FROM north_american_cities WHERE country = “Canada”;

  2. select city, latitude from North_american_cities where country = “United States” order by latitude desc;

  3. select city ,longitude from north_american_cities where longitude < -87.629798 order by longitude;

  4. select city,population from North_american_cities
    where country = “Mexico”
    order by population desc
    limit 2;

  5. select city,population from North_american_cities
    where country = “United States”
    order by population desc
    limit 2,2;

    country like ‘%canada%’ ,注意此处为单括号

    country = “Canada”,注意此处为双括号

以上内容来自我在下面网上学习所做的笔记

https://sqlbolt.com/lesson/select_queries_with_joins

http://xuesql.cn/lesson/select_queries_with_joins

相关文章:

  • 2021-09-18
  • 2022-12-23
  • 2021-11-21
  • 2021-10-15
  • 2021-11-18
  • 2021-12-05
  • 2021-12-31
猜你喜欢
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
相关资源
相似解决方案