时间:2021-07-01 10:21:17 帮助过:244人阅读
http://bbs.csdn.net/topics/350135010
参考
select *
from a aa left join
b bb on aa.id=bb.cid and bb.adddate=(select max(adddate) from b where cid=bb.cid)
自己写
Left join rechargeSheet rs on rs.PaymentCode=o.order_code and rs.CreationTime=(select MAX(CreationTime) from rechargeSheet where PaymentCode=rs.PaymentCode)
Sql 两个表left join 查左表最时间最大的一条记录显示
标签:date sdn csdn sql max where ddd char ati