devroom.io/content/posts/2008-11-14-sql-ordering-with-null-values.md

14 lines
554 B
Markdown
Raw Normal View History

2015-03-26 11:28:08 +00:00
+++
date = "2008-11-14"
title = "SQL: Ordering with NULL values"
tags = ["General", "order", "database", "sql"]
slug = "sql-ordering-with-null-values"
+++
First seen at <a href="http://blog.kabisa.nl">Kabisa Blog</a>: <a href="http://blog.kabisa.nl/2008/11/14/sql-ordering-with-null-values/">SQL: Ordering with NULL values</a>
This post tells you how to sort <code>NULL</code> values in a column to the bottom and sort the remaining non-<code>NULL</code> values.
This is really great in combination with LEFT JOIN queries that may yield NULL values.