我有4个表格
student
-------
id, int
firstName, varchar
lastName, varchar
course
------
id, int
name, varchar
semester
--------
id, int
name, varchar
mark
----
studentId, int
courseId, int
semesterId, int
mark, int
我想作一个 s问,再保留firstName
,lastName
,ario Name
,semesterName
和>,在
mark
的表格中各行各加标>。
我试图与INNER JOIN一道这样做,但我可以把INNER JOIN列入一个以上表格。
That code I reached finally
select student.firstName, student.lastName, course.name, semester.name, mark.mark
from mark
INNER JOIN student ON student.id = mark.studentId
INNER JOIN course ON course.id = mark.courseId
INNER JOIN semester ON semester.id = mark.semesterId