What is the differences between cross apply and inner join ?
Especially in case of selecting top 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