title: SQL Query using INNER JOIN
body: <blockquote>
    <p>Write a query that displays the student firstname, lastname, course number, and course name
    for all students taking classes – use an INNER Join. Label the output columns Student First, Student Last,
    Course Number, and Course Name. You should have 7 rows.</p>
  </blockquote>
  
  <p>is the question in my lab.</p>
  
  <p>there are three tables students,courses,registration</p>
  
  <p>I can get the names of the students that are registered in a course with</p>
  
  <pre><code>select firstname,lastname from students
  inner join on registration students.studentid=registration.studentid
  </code></pre>
  
  <p>but when i try to get the other data the teacher wants returned from the courses table it doesnt work I tried a million things but what makes sense to me is</p>
  
  <pre><code>select firstname,lastname,coursenumber,coursename from students,courses
  inner join registration on students.studentid=registration.studentid
  </code></pre>
  
  <p>but it gives me an error unknown column students.studentid in on clause.</p>