【notexists】...select*fromcoursewherenotexists(select*fromscwheresn】
答案:2 悬赏:10 手机版
解决时间 2021-02-26 15:45
- 提问者网友:战皆罪
- 2021-02-26 05:47
【notexists】...select*fromcoursewherenotexists(select*fromscwheresn】
最佳答案
- 五星知识达人网友:第幾種人
- 2021-02-26 06:09
【答案】 第一问:两个NOT EXISTS表示双重否定:没有一个选了课的学生没有选course表里的课程
select sname
from student
where not exists
(select * from course
where not exists
(select * from sc
where sno =student.sno
第二问:其实和NOT IN 是一个意思 exists只返回true 或false 这里not exists里的内容 其实就是指学生选过的课程,再用NOT EXISTS否定了,就变成了没有选的
select sname
from student
where not exists
(select * from course
where not exists
(select * from sc
where sno =student.sno
第二问:其实和NOT IN 是一个意思 exists只返回true 或false 这里not exists里的内容 其实就是指学生选过的课程,再用NOT EXISTS否定了,就变成了没有选的
全部回答
- 1楼网友:患得患失的劫
- 2021-02-26 06:39
我学会了
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯