TSQL ORDER BY with nulls first or last (at bottom or top)

后端 未结 4 1303
被撕碎了的回忆
被撕碎了的回忆 2020-12-24 06:58

I have a date column which has some NULL. I want to order by the date column ASC, but I need the NULL s to be at the bottom. How to do it on

4条回答
  •  我在风中等你
    2020-12-24 07:25

    This did the trick for me just now. Fortunately, I'm working with text. For anything numeric, I'd probably go with all 9's. COALESCE(c.ScrubbedPath,'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'),

提交回复
热议问题