mysql order by date null last code example Example: mysql order by date asc null last ORDER BY IF(ISNULL(my_field),1,0),my_field ASC