Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Need some guide line for using OUTER and CROSS APPLY in sql server

$
0
0

I am new familiar with OUTER and CROSS APPLY keyword and their usage. i got a article which show the little bit usage of CROSS APPLY keyword. here it is.

SELECT *
FROM Vehicles V
INNER JOIN MileageLog ML ON V.ID = M.VehicleID

SELECT *
FROM Vehicles V
CROSS APPLY (SELECT * FROM MileageLog ML WHERE V.ID = ML.VehicleID) ML

    i just like to know why people use CROSS APPLY to join two table....is there will any performance issue means joining table with CROSS APPLY will be faster ?

    so i like to know what CROSS APPLY actually does and in what kind of situation one should use CROSS APPLY ?

    what outer apply does and how it is different from CROSS APPLY ?.

    OUTER and CROSS APPLY available from which version of sql server ?

please describe with example. thanks

Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>