mysql的测试题
要求:将score表,student表,class表连接起来,并且筛选出其中的sid,student_id,sname,course_id,cname,number
SELECT
score.sid,
score.student_id,
student.sname,
score.course_id,
course.cname,
score.number
FROM
score
LEFT JOIN student ON score.student_id=student.sid
LEFT JOIN course ON score.course_id = course.cid;
运行结果: