Re: Sorting with NULL

2006-01-09 Thread Michael Stassen
Marcus Bointon wrote: I have a table that contains a foreign key that can be null. When I do a search I want to have the matches that are null appear first, and then all other values sorted by another column. My data looks like this: idname nullabc 1def 2xyz nullzzz 7

re: Sorting with null values

2003-02-09 Thread Victoria Reznichenko
On Thursday 06 February 2003 17:05, Octavian Rasnita wrote: > Please tell me how can I sort a column and force placing the null values to > the end of list? Something like: SELECT ... ORDER BY IF(column_name IS NULL, 1, 0), column_name; -- For technical support contracts, goto https://order.m

Re: Sorting with null values (auto)

2003-02-09 Thread mysql-list
Hi "Octavian Rasnita" <[EMAIL PROTECTED]>, I'm not sure if you have checked the manual yet, but following links seem to be somewhat related to your query: * http://www.mysql.com/doc/en/Problems_with_NULL.html * http://www.mysql.com/doc/en/NULL_values.html * http://www.mysq