根据时间倒序排序
select * from t_test order by gmt_modified desc limit 5;
根据时间、id倒序排序
select * from t_test order by modified_time desc,id desc limit 5;
//不能写成 order by modified_time ,id desc
order by 有优先顺序,在前面的字段排序优先级高;order by modified_time desc,id desc 排序查询中先排序modified_time 字段
网友评论