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

Sorting with NULL

2006-01-09 Thread Marcus Bointon
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: id name nullabc 1 def 2 xyz nullzzz 7 aaa I wan

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
s.html * http://www.mysql.com/doc/en/CREATE_TABLE.html * http://www.mysql.com/doc/en/Working_with_NULL.html * http://www.mysql.com/doc/en/Comparison_Operators.html This was an automated response to your email 'Sorting with null values'. Final search keyword used to quer

Sorting with null values

2003-02-07 Thread Octavian Rasnita
Hi all, Please tell me how can I sort a column and force placing the null values to the end of list? Thank you sql query Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Before posting, please check: