title: OUTER apply without subquery
body: <p>I went through an article about <code>CROSS APPLY</code> and <code>OUTER APPLY</code>in SQL Server.  The following tables were used to illustrate both.</p>
  
  <p>Employee table :</p>
  
  <pre><code>EmployeeID  FirstName   LastName    DepartmentID
  
  1           Orlando     Gee         1
  2           Keith       Harris      2
  3           Donna       Carreras    3
  4           Janet       Gates       3
  </code></pre>
  
  <p>Department table:</p>
  
  <pre><code>DepartmentID    Name
  1               Engineering
  2               Administration
  3               Sales
  4               Marketing
  5               Finance
  </code></pre>
  
  <p>I understood that <code>OUTER APPLY</code> is similar to <code>LEFT OUTER JOIN.</code> But when I applied <code>OUTER APPLY</code> between tables as below,</p>
  
  <pre><code>select * from Department e
  outer apply
  Employee d
  where d.DepartmentID = e.DepartmentID
  </code></pre>
  
  <p>I got below results (Same as <code>INNER JOIN</code> results)</p>
  
  <pre><code>DepartmentID    Name           EmployeeID   FirstName   LastName    DepartmentID
  1               Engineering     1           Orlando     Gee          1
  2               Administration  2           Keith       Harris       2
  3               Sales           3           Donna       Carreras     3
  3               Sales           4           Janet       Gates        3
  </code></pre>
  
  <p>When I applied <code>OUTER APPLY</code>  between tables as below( with <code>right table</code> as a subquery).</p>
  
  <pre><code>select * from Department e
  outer apply
  (
  select * from
  Employee d
  where d.DepartmentID = e.DepartmentID
  )a
  </code></pre>
  
  <p>I got below results (Same as <code>LEFT OUTER JOIN</code> results)</p>
  
  <pre><code>DepartmentID    Name           EmployeeID   FirstName   LastName    DepartmentID
  1               Engineering     1           Orlando     Gee          1
  2               Administration  2           Keith       Harris       2
  3               Sales           3           Donna       Carreras     3
  3               Sales           4           Janet       Gates        3
  4               Marketing       NULL        NULL        NULL         NULL
  5               Finance         NULL        NULL        NULL         NULL
  </code></pre>
  
  <p>Can Someone explain why the two queries gave different <code>outputs</code>?</p>