问题:
mysql查询数据, 根据时间排序, null数据排在前面.
select * from table_name
where id
= ×××××××××
order by time asc;
目的:
not null 数据根据时间排序, null值数据排在后面.
处理:
select * from table_name
where id
= ×××××××××
order by ISNULL(time),time asc;
问题:
mysql查询数据, 根据时间排序, null数据排在前面.
select * from table_name
where id
= ×××××××××
order by time asc;
目的:
not null 数据根据时间排序, null值数据排在后面.
处理:
select * from table_name
where id
= ×××××××××
order by ISNULL(time),time asc;