title: ORACLE Not In on Multiple Columns
body: <p>Kindly have a look at the following structure.</p>
  
  <pre><code>Table: A
  +---------+----------+
  | Col1A   | Col2A    |
  +---------+----------+
  |   1     |    1     |
  |   2     |    1     |
  |   3     |    1     |
  |   4     |    1     |
  |   1     |    2     |
  |   2     |    2     |
  +---------+----------+
  
  Table: B
  +---------+----------+
  | Col1B   | Col2B    |
  +---------+----------+
  |   2     |    1     |
  |   3     |    1     |
  +---------+----------+
  </code></pre>
  
  <p>Here is what I am trying to achieve that is to get the result as following:</p>
  
  <pre><code>Result 
  +---------+----------+
  | Col1A   | Col2A    |
  +---------+----------+
  |   1     |    1     |
  |   4     |    1     |
  |   1     |    2     |
  |   2     |    2     |
  +---------+----------+
  </code></pre>
  
  <p><strong>What I want :</strong></p>
  
  <p>I want to get the result of table <code>A</code> records which are not exists in Table <code>B</code>. It should be on the basis of both column. If the combination exist in first table then don't no show it.</p>
  
  <p><strong>What I have tried so far :</strong></p>
  
  <p>The first approach that I have tried was to use <code>Not In</code> statement. Following is my statement.</p>
  
  <pre><code>SELECT A.COL1A, A.COL2A 
  FROM A
  WHERE A.COL1A NOT IN (
     SELECT B.COL1B FROM B
  );
  </code></pre>
  
  <p>But the issue with this approach didn't consider the second column. It will give me the following result.</p>
  
  <pre><code>+---------+----------+
  |   1     |    1     |
  |   4     |    1     |
  +---------+----------+
  </code></pre>
  
  <p>While it will not show following as it should be sub-traced because of we didn't checked for other column.</p>
  
  <pre><code>+---------+----------+
  |   1     |    2     |
  |   2     |    2     |
  +---------+----------+
  </code></pre>
  
  <p>Then I tried <code>Not Exists</code> but I didn't worked too. Here is my query.</p>
  
  <pre><code>SELECT A.COL1A, A.COL2A 
  FROM A
  WHERE NOT EXISTS(
     SELECT B.COL1B,B.COL2B FROM B
   );
  </code></pre>
  
  <p><strong>Edit</strong>
  Sorry I forget to include the fiddle link.<br>
  Here it is : <kbd><a href="http://sqlfiddle.com/#!4/86916/1" rel="nofollow"><code>Fiddle Demo</code></a></kbd></p>