title: Most efficient SQL Statement: Exists vs IN
body: <p>I have three tables that I need to <code>JOIN</code> to get values from two columns.
  These columns are  <code>GRN_STATUS</code> and <code>STATUS</code> I have written some SQL that achives the desired result but I've been advised that using <code>IN</code>is very inefficient and that I should use <code>EXISTS</code> instead.</p>
  
  <p>I'm just wondering is this true in my situation? and what would a solution using <code>EXISTS</code> instead of <code>IN</code> look like?</p>
  
  <p>SQL:</p>
  
  <pre><code>SELECT c.GRN_STATUS, a.STATUS
  FROM
      TableA a
          INNER JOIN
      TableB b
          ON a.ORD_NO = b.ORD_NO
          AND a.COMPANY_ID = b.COMPANY_ID
          INNER JOIN
      TableC c
          ON b.GRN_NO = c.GRN_NO
          AND b.COMPANY_ID = c.COMPANY_ID
  AND a.STATUS IN ( 'B', 'C', 'D', 'E' )
  AND c.GRN_STATUS = 'A';
  </code></pre>