sql语句是什么,那个时间怎么弄?????
select * from department d
left join (select id,Max(createTime) as createTime from department group by id) t on t.id = d.id
where d.createTime = t.createTime
select * from Department ORDER BY 创建时间 desc limit 1
这是不对的 你只取了最新的一条