嵌套、组合、统计查询
--嵌套查询
--1. 求选修了C语言编程的学生学号和姓名
SELECT studentid,student_name FROM student
WHERE studentid IN (SELECT studentid FROM sc
WHERE courseid IN (SELECT courseid FROM course
WHERE course_name='C语言编程'))
--2. 求C1课程的成绩高于李明的学生学号和成绩
SELECT studentid,grade FROM sc
WHERE courseid='C1' AND grade>(SELECT grade
FROM sc
WHERE courseid='C1' AND studentid=(SELECT s
嵌套、组合、统计查询最先出现在Python成神之路。
共有 0 条评论