My question is like this: How do I display the order of a table by code (e.g. 01, 02 ... then zero columns)? but for SQL Server.
In short, I have a SELECT statement that returns the following:
ColumnA ColumnB X NULL Y 1 Z 2
.. where the ordering is done in column B.
How can we force rows (columnB = NULL) at the bottom? those. Expected Result:
ColumnA ColumnB Y 1 Z 2 X NULL
Thank you SOF community.
sorting null sql-server select sql-order-by
FMFF
source share