mysql 根据不同的条件排序 需求 参考链接 需求 本年度的数据根据创建时间倒叙排,往年的数据根据名字小写字母的顺序排。 参考sql select * from tb_name s ORDER BY if( YEAR(s.creation_time)=YEAR(NOW()), // 判断条件 1