MySQL - SELECT the name that comes first alphabetically

后端 未结 11 1540
悲&欢浪女
悲&欢浪女 2020-12-24 08:50

I have started to learn MySQL.

Here is the table world:

+-------------+-----------+---------+
|    name     | continent |  area   |
+--         


        
11条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-24 08:57

    SELECT continent,
           name
    FROM world x
    WHERE name=
        (SELECT name
         FROM world y
         WHERE x.continent=y.continent
         ORDER BY name
         LIMIT 1)
    

    This is correlated/ synchronous query.

提交回复
热议问题