MYSQL排序null排最后

mysql排序,null值排最后

倒序:mysql会自动把null放最后

-- order by actual_forfeit desc; 
select * from zto_truck_not_start order by actual_forfeit desc; 

正序:

-- order by sortField is null,sortField asc; 
select * from zto_truck_not_start order by actual_forfeit is null,actual_forfeit asc; 

你可能感兴趣的:(MYSQL,mysql,数据库,排序)