将sname,degree,rank三表组合匹配成一张新表
SELECT sname,degree,rank FROM students
INNER JOIN scores ON (students.`sno` = scores.`sno`)
INNER JOIN grade ON
(scores.`degree` >= grade.`low` AND scores.`degree` <= grade.`upp`)
ORDER BY degree DESC
将sname,degree,rank三表组合匹配成一张新表
SELECT sname,degree,rank FROM students
INNER JOIN scores ON (students.`sno` = scores.`sno`)
INNER JOIN grade ON
(scores.`degree` >= grade.`low` AND scores.`degree` <= grade.`upp`)
ORDER BY degree DESC