include null values in order by clause mysql code example Example: mysql order by desc null last SELECT * FROM user ORDER BY COALESCE(name, 'zz') DESC