Blogroll

Search

SQL Order By with Nulls at the end.

April 27th, 2010 by Karl

I wanted to order a column alphabetically however NULLS show up first. I want the items will null, but i want them after the rest so i applied this like quick and dirty order by clause.

order by isnull(displayname,’zzzzzzz’)

it effectively puts nulls at the end. If you know a cleaner and just as pithy way I’d love to hear it.

Posted in SQL | 3 Comments »