1010011010
V2EX  ›  问与答

[mysql] 怎么以 聚合函数返回值 是否为空 排序?

  •  1
     
  •   1010011010 · Aug 8, 2017 · 2013 views
    This topic created in 3198 days ago, the information mentioned may be changed or developed.
    ...
      select group_concat(...) as foo
    ...
      order by foo is null asc
    

    会返回错误 Reference 'foo' not supported (reference to group function)

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   985 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:46 · PVG 04:46 · LAX 13:46 · JFK 16:46
    ♥ Do have faith in what you're doing.