title: LEFT OUTER JOIN EQUIVALENT
body: <p>I have a tables contains null values. In ORDER table i have 2 null in PART_ID section and 2 null values in CUSTOMER_ID. </p>
  
  <p>And i have that kind of query:</p>
  
  <pre><code>SELECT O.ORDER_ID , O.ORDER_DATE , O.CUST_ID, O.QUANTITY ,O.PART_ID ,
         C.CUST_NAME, C.CUST_CODE, P.PART_NAME, P.PART_CODE
  FROM [ORDER] O
       LEFT OUTER JOIN PART P ON P.PART_ID = O.PART_ID
       LEFT OUTER JOIN CUSTOMER C ON C.CUST_ID = O.CUST_ID 
  </code></pre>
  
  <p>So here is my question. How can i do it without using outer join ? 
  I tried too many things including where not exists or this ;</p>
  
  <pre><code>SELECT *
  FROM [ORDER] O ,CUSTOMER C, PART P
  WHERE C.CUST_ID = (
    SELECT CUST_ID FROM CUSTOMER C WHERE O.CUST_ID = C.CUST_ID
  ) AND P.PART_ID = (SELECT PART_ID FROM PART P WHERE O.PART_ID = P.PART_ID) 
  </code></pre>
  
  <p>but i couldn't find solution. If there is a solution how it will be ?</p>
  
  <p>(Note: this is homework.)</p>
  
  <p>I have that kind of table :</p>
  
  <p><img src="https://i.stack.imgur.com/hhewO.png" alt="enter image description here"></p>
  
  <p>and left outer join gives that :</p>
  
  <p><img src="https://i.stack.imgur.com/29cq8.png" alt="enter image description here"></p>
  
  <p>the hw said do it without using outer join and get same table as left outer join gives.  But like a said i coulnd't. I'm also using MSSQL. </p>