title: SQL to check if the value is not present in table
body: <p>I am working on following SQL:    </p>
  
  <pre><code>select *
  from `STUDENTLOC` l,
      STUDENT s,
      ATTENDANCE a
  where l.STUDENTID = s.ID
      and l.LOCID = 3
  </code></pre>
  
  <p>Now I need to make sure that the values are not already present in ATTENDANCE table. It has following structure:</p>
  
  <pre><code>ID  StudentID   ScheduleID
  1      6            6   
  2      3            3
  </code></pre>
  
  <p>It is a simple list where I need to display list of students whose record have not been added in ATTENDANCE table.</p>