left join outer apply

Solutions on MaxInterview for left join outer apply by the best coders in the world

showing results for - "left join outer apply"
Leon
15 Jan 2019
1--Script #3 - OUTER APPLY and LEFT OUTER JOIN
2
3SELECT * FROM Department D 
4OUTER APPLY 
5   ( 
6   SELECT * FROM Employee E 
7   WHERE E.DepartmentID = D.DepartmentID 
8   ) A 
9GO
10 
11SELECT * FROM Department D 
12LEFT OUTER JOIN Employee E ON D.DepartmentID = E.DepartmentID 
13GO