Today someone ask about how to order a column, she want order nulls at the beginning of the report, she told that can perform it on Oracle. She is correct, or maybe not, many people think NULLS FIRST or NULLS LAST is an impletantion by Oracle but it isn’t true. This syntax is defined by the standard, ISO 9075/ANSI SQL. Many database vendors not implement this feature
In this case the query is on SQL Server, a simple way to resolve it is like show below;
SELECT S.SESSION_ID, WT.WAIT_TYPE FROM SYS.DM_OS_WAITING_TASKS AS WT RIGHT OUTER JOIN SYS.DM_EXEC_SESSIONS AS S ON WT.SESSION_ID = S.SESSION_ID WHERE S.IS_USER_PROCESS = 0 ORDER BY ISNULL (WT.WAIT_TYPE, '1')
With this query you get the nulls first, and change the 1 by ZZZ (for example) you get nulls last.
HTH – Antonio NAVARRO