title: How to fetch the non matching rows in Oracle
body: <p>Can anyone help me fetch the non matching rows from two tables in Oracle?</p>
  
  <h2>Table: Names</h2>
  
  <pre><code>Class_id        Stud_name
  S001          JAMES
  S001          PETER
  S002          MARK
  </code></pre>
  
  <h2>Table: Course</h2>
  
  <pre><code> Course_id   Stud_name
    S001       JAMES
    S001       KEITH
    S002       MARK
  </code></pre>
  
  <h2>Output</h2>
  
  <p>I need the rows to display as  </p>
  
  <pre><code>   CLASS ID    STUD_NAME_FROM_NAME_TABLE    STUD_NAME_FROM_COURSE_TABLE
     --------------------------------------------------------------------- 
      S001          PETER                        KEITH
  </code></pre>
  
  <p>I have used Oracle joins to fetch the non matching names:</p>
  
  <pre><code>      SELECT * 
          FROM Names, Course 
         WHERE Names.Class_id=Course.Course_id 
           AND Names.Stud_name&lt;&gt;Course.Stud_name   
  </code></pre>
  
  <p>This query is returning duplicate rows.</p>