首页 > 数据库技术 > 详细

从数据库表中查询日期最新的记录

时间:2018-04-25 16:26:14      阅读:247      评论:0      收藏:0      [点我收藏+]

select a.* from data_subtaskregionschedule a inner join(select subregionid,max(updatetime) maxupdatetime
from data_subtaskregionschedule group by subregionid) b on a.subregionid=b.subregionid and a.updatetime
=b.maxupdatetime;

实测可行

从数据库表中查询日期最新的记录

原文:https://www.cnblogs.com/xiaoyuersdch/p/8945281.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!