77问答网
所有问题
当前搜索:
求选修了课程的学生学生号
...至少选了学生200215122
选修的
全部
课程的学生号码
。 注:sc为课程表...
答:
应该是 from sc scz where scz.sno=scx.sno and scz.cno=scy.cno
SQL如何查询
选修了
两门以上
课程的学生
信息?
答:
2:select s.sno,s.name from student swhere s.sno in(select sno from score scgroup by sc.cno having sum(sc.sno)>2 )3:应为三张表;学生表A 课程表B
选修
表C(cid aid bid)--没有选修任何
课程的学生
的学号 结构化查询语言(Structured Query Language)简称SQL(发音:/ˈes kju...
要查询
选修了
所有
课程的学生
信息,怎样用sql实现
答:
第一问:两个NOT EXISTS表示双重否定:没有一个选
了课的学生
没有选course表里的课程 select sname from student where not exists /*没有一个学生满足以下条件*/ (select * from course where not exists /*什么条件呢?没有选过Course表里的课*/ (select * from sc where sno =st...
SQL 数据查询 查询选择了同一门
课程的
两个不同
学生
的学号及其
课程号
答:
select s.s#,c.c#from sc,s,cwhere sc.s#=s.s# and sc.c#=c.c#having count(sc.s#)=2;--只包含两个不同
的学生
count(sc.s#)>1 --两个或两个以上的学生
用关系代数表示
选修了
1号和2号
课程的学生
学号
答:
πsno (σcno=1(SC)) intersact πsno (σcno=2(SC))自己换一下交的符号
数据库的复杂查询
答:
希望可以帮到你 --查询
选修了
“计算机体系结构”
的学生
的基本信息。select from 学生 where 学号 in (select 学号 from 选课 where
课程号
in (select 课程号 from 课程 where 课程名称='计算机体系结构'))--查询年龄比李勇小的学生的学号和成绩。select 学号,成绩 from 选课 where 学号 in (select...
查询至少
选修了学生
2001选修的全部
课程的学生号码
.
答:
不存在这样的
课程
y,
学生
2001
选修了
y,而学生x没有选。select distinct sno from sc scx where not exists (select * from sc scy where scy.sno='2001'and not exists (select * from sc scz where scz.sno=scx.sno and scz.cno=scy.cno ));...
...查询与10060101
学生选修
的全部课程相同
的学生
的学号、
课程号
、期末...
答:
-- 1、查询与10060101
学生选修
的全部课程相同
的学生
的学号、
课程号
、期末考试成绩select sno, cno, grade from sc a group by sno, cno, grade having a.sno<>'10060101' and not exists ((select cno from sc where sno='10060101') except (select cno from sc where sno=a.sno))...
...查询
学生号
‘20110501’
的学生选修
的所有
课程的课程号
、课程名...
答:
select c.姓名,a.
课程号
,b.课程名,a.成绩 from 选课 a left join 课程 b on a.课程号=b.课程号 left join 学生 c on a.
学生号
=c.学生号 where a.学生号='20110501'
用SQL查询同时
选修了
1号课和2
号课的学生
学号怎么查?
答:
你好像写错了吧,,,我感觉应该是 select Sno from SC where Cno='1' and son in (select Sno from SC where Cno='2');或者 where Cno='1' intersert select Sno from SC where Cno='2');INTERSECT对两个查询做交集。相当于and ...
棣栭〉
<涓婁竴椤
2
3
4
5
6
7
8
9
10
11
涓嬩竴椤
灏鹃〉
其他人还搜