APPLY is a row-by-row operator that allows you to APPLY
each row of the prior tables to either a function or a subquery. It therefore is very useful in situations where
- you need the latest/max/min record from B from each record in A
- you need to run a table-valued function on each record in A
Yes it can substitute a JOIN but but it will perform terribly where a normal JOIN would have worked, because you're forcing SQL Server to use row-by-row operators rather than set-based JOIN.
The difference between CROSS APPLY and OUTER APPLY is the same as the difference between INNER JOIN and OUTER JOIN. Basically, CROSS APPLY will remove the source record if the function/subquery to which it is applied returns 0 records. OUTER APPLY keeps the source record.
Read more : Using Apply (msdn)