SQL Server equivalent to Oracle's NULLS FIRST?

前端 未结 8 598
心在旅途
心在旅途 2020-12-08 00:50

So Oracle has NULLS FIRST, which I can use to have null values sorted at the top followed by my column value in descending order:

ORDER BY date_sent NULLS FI         


        
8条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 01:02

    You can't control this, to my knowledge. And it looks like you have the correct approach with ISNULL.

    With strings, I've used ISNULL(field, '') for the same purpose.

提交回复
热议问题