SQL不支持自然连接查询,方法是等值连接的基础上消除重复列
SELECT
score.studentNo,
score.courseNo,
score.score,
course.courseNo,
course.courseName,
course.creditHour,
course.courseHour,
course.priorCourse
FROM
score
INNER JOIN course ON score.courseNo = course.courseNo
SELECT
score.studentNo,
score.courseNo,
score.score,
course.courseNo,
course.courseName,
course.creditHour,
course.courseHour,
course.priorCourse
FROM
score
INNER JOIN course ON score.courseNo = course.courseNo