O'Reilly logo
  • Dustin Waybright thinks this is interesting:

As an interesting challenge, see if you can figure out how to sort the orders by shipped date ascending, but have NULLs sort last. (Hint: You can specify expressions in the ORDER BY clause; think of how to use the CASE expression to achieve this task.)


Cover of Training Kit (Exam 70-461): Querying Microsoft® SQL Server® 2012


Could include ORDER BY COALESCE(col1,'ZZZZZZZ') as an example.