------代码------
SELECT *FROM studentINNER JOIN score ON student.sid = score.student_id INNER JOIN class ON student.class_id = class.cid;
-------student为主表,score和class为从表 要想实现三表连接,就只需要再创建一个主表与从表外键约束------
------以下为运行结果------