Answers for "cross apply vs inner join"

SQL
0

sql cross apply vs join

SELECT M.ID,M.NAME,D.PERIOD,D.QTY
FROM MASTER M
INNER JOIN
(
    SELECT TOP 2 ID, PERIOD,QTY 
    FROM DETAILS D      
    ORDER BY CAST(PERIOD AS DATE)DESC
)D
ON M.ID=D.ID
Posted by: Guest on April-20-2021
0

difference between cross apply and inner join

JOIN operators can be used to join two physical tables and JOIN operators can be replaced by 'APPLY' operators in order to achieve the same results but it is mainly used to join a physical table with output of a table valued function.
Posted by: Guest on November-01-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language