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

18 lines
576 B
Markdown
Raw Normal View History

2013-03-24 21:28:43 +00:00
---
title: "SQL: Ordering with NULL values"
kind: article
slug: sql-ordering-with-null-values
created_at: 2008-11-14
tags:
- General
- order
- database
- sql
- null
---
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.