Posted By

danfsmith on 11/09/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

johnw


SQL - Move nulls to end of ORDER BY clause


 / Published in: SQL
 

  1. SELECT custid, region
  2. FROM [Sales].[Customers]
  3. ORDER BY
  4. case when region IS NULL THEN 1 ELSE 0 END, region;

Report this snippet  

You need to login to post a comment.