1010011010
V2EX  ›  问与答

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

  •  1
     
  •   1010011010 · Aug 8, 2017 · 2033 views
    This topic created in 3209 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   ·   2842 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 01:46 · PVG 09:46 · LAX 18:46 · JFK 21:46
    ♥ Do have faith in what you're doing.