sql Order By NULL

SELECT *
FROM myTable
ORDER BY
	CASE
		WHEN myField IS NULL THEN 1
		ELSE 0
	END
Orders a table by a column containing NULL values.

Updated: Friday 8th October 2010, 11:30pm

There are 0 comments

Leave a comment of your own

Comments are currently closed.