Is order by clause allowed in a subquery

前端 未结 9 1533
离开以前
离开以前 2020-12-10 14:34

Is there any reason why or why not you should do an \'order by\' in a subquery?

9条回答
  •  臣服心动
    2020-12-10 15:15

    It's totally legit. I.e. SELECT id FROM entries WHERE author_id IN (SELECT id FROM authors ORDER BY name DESC) but you'll really get the same results usually.

提交回复
热议问题