title: SQL query help (ambiguous column error) using select for multiple table queries
body: <p>I am having trouble with an 'Ambiguous column name' will really appreciate your help with this as I am stuck on this and don't understand. I am learning SQL </p>
  
  <p>Basically I am trying to generate a student detail who fail the exam using multiple tables. </p>
  
  <pre><code>select 
      examDate, examLevel, examSubject, examResult, 
      studentID, studentFirstName 
  from 
      completedExams, exams, student
  where 
      (completedExams.examNo = exams.examNo) 
      and (completedExams.examResult = 'Fail')
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Msg 209, Level 16, State 1, Line 2<br>
    Ambiguous column name 'studentID'.</p>
  </blockquote>