嵌套、组合、统计查询

--嵌套查询
--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成神之路

版权声明:
作者:ht
链接:https://www.techfm.club/p/14517.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>