sql join与 top 一起使用

select top 10 * From  A   outer apply (select top 1 * from B where A.ID=B.ID order by A.DATETIME desc) as B

关键 处(  outer apply )

原文地址:https://www.cnblogs.com/shanshuiYiCheng/p/15497946.html