关于数据库的题目
发布网友
发布时间:2022-04-29 03:08
我来回答
共3个回答
热心网友
时间:2022-04-29 22:38
1
select s.sno,s.sname from s,c,sc where s.sno=sc.sno and c.cno=sc.cno and c.cname='MS'
2
select sno from sc where cno='C1' and sno in (select sno from sc where cno='C3')
3
select s.sno,sc.grade from s,c,sc where s.sno=sc.sno and c.cno=sc.cno and c.cname in('数据库','操作系统')
4
select sno,sname,age from s where 性别='女' and age between 18 and 20
5
select s.sno,s.sname,sc.grade from s,c,sc where s.sno=sc.sno and c.cno=sc.cno and c.teacher='刘平'
6
select distinct s.sname from s,sc where s.sno=sc.sno and cno in(select cno from sc having count(distinct cno)=(select count(*) from c))
7
select distinct sname from s where sno in(select sno from sc where cno in(select cno from sc where sno='1042') group by sno having count(*)=(select count(*) from sc where sno='1042'))
8
select sname,age,所在系 from s where sname like '樊%'
9
select sname,age,所在系 from s where sno in(select sno from sc group by sno having count(*)>3)
其中4,8,9,你给的字段里分辨不出来哪些字段是性别和所在系,根据实际情况自己替换
热心网友
时间:2022-04-29 23:56
SQL SERVER最基本的操作,教科书上有现成的,不要太懒,学习动点脑筋。
热心网友
时间:2022-04-30 01:31
SQL基操,学过,但忘了。教科书上分好几段讲的,变下数据套进去就好,很简单的,不要太懒。