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)

相关文章:

  • 2022-01-10
  • 2021-09-17
  • 2022-01-22
  • 2021-08-18
  • 2021-12-04
  • 2022-12-23
  • 2021-05-05
  • 2022-12-23
猜你喜欢
  • 2022-01-11
  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2021-04-29
  • 2021-05-22
相关资源
相似解决方案