Between the three tables join query

Code ------ ------

SELECT *
FROM student
INNER JOIN score ON student.sid = score.student_id
INNER JOIN class ON student.class_id = class.cid;

------- student-based table, score and class in order to achieve the three-table join from the table, we just need to create a master table with the foreign key constraint from the table ------

------ ------ The following is the operating results

 

Guess you like

Origin www.cnblogs.com/iexhongxin/p/11371868.html