Mac
V2EX  ›  问与答

MariaDB 和 Mysql 的一个很奇怪的区别,怎么破?

  •  
  •   Mac · Oct 21, 2014 · 4143 views
    This topic created in 4418 days ago, the information mentioned may be changed or developed.
    select * from (select id from xx order by id desc) as abc

    这句子查询

    mysql 返回的是降序的id
    MariaDB 返回的却是升序的,非要把 order by 放在子查询外面。这是MariaDB的特性还是有什么开关可以让它兼容在子查询里排序?
    3 replies  •  2014-10-21 18:47:45 +08:00
    woshixiaomao
    woshixiaomao
    Oct 21, 2014
    1
    版本问题,旧版的是不支持自查询的,.
    Mac
    Mac
    OP
    Oct 21, 2014 via Android
    2
    @woshixiaomao 用的是版本10,应该不是版本问题,和子查询无关啊,只是order by有点问题
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1060 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 18:40 · PVG 02:40 · LAX 10:40 · JFK 13:40
    ♥ Do have faith in what you're doing.