mysql不能像oracle一样,使用nulls first 和nulls last,可以使用下面的语句代替
nulls first
order by IF(ISNULL(my_field),0,1), my_field;
nulls last
order by IF(ISNULL(my_field),1,0),my_field;
mysql不能像oracle一样,使用nulls first 和nulls last,可以使用下面的语句代替
nulls first
order by IF(ISNULL(my_field),0,1), my_field;
nulls last
order by IF(ISNULL(my_field),1,0),my_field;