交叉申请和内部联接有什么区别?
特别是在选择前1名的情况下?
select
r.userId, acceptorId, pspCode, terminalId, zoneName, zoneCode
from
reports..Report_950226 r
cross apply
(select top 1
acceptorId, branchCode, terminalId, pspCode
from
registerUser_AcceptorProfile ra
where
ra.userId = r.userId
order by
id_ desc) acceptor
inner join
registerUser_Branch branch on branch.branchCode = acceptor.branchCode