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.
is the question in my lab.
there are three tables students,courses,registration
I can get the names of the students that are registered in a course with
select firstname,lastname from students
inner join on registration students.studentid=registration.studentid
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
select firstname,lastname,coursenumber,coursename from students,courses
inner join registration on students.studentid=registration.studentid
but it gives me an error unknown column students.studentid in on clause.
courses?