查看详情时,页面只能展示7条数据,当数据大于7条时,如何给前端只传最新的7条数据
按照时间逆序排序,截取前7条
sql按日期倒序排列 select top 7 * from table where ..... order by createDate desc