select distinct Sn
from S,C,SC
where SS#=SCS#
and CC#=SCC#
and Cn in(select Cn from S,C,SC
where SS#=SCS#
and CC#=SCC#
and SS#='s5')
1:insert into student values('990012','梅立松',20,'女')
2: delete sc where sno=(select sno from student where name='夏春秋')
3: update SC set grade=grade(1+20%) where cno =(select cno from course where cname='英语')
1>select sno,sname from Student where sdept='IS'
2>select SNO,GRADE from SC where SNO=1
3>select SCGRADE ,CCName from SC , C where SCSNO=990101 and SCCNO=CCNO
4>select Studentsname SCSNO SCCNO from Student inner join SC on StuentSNO=SCSNO where SCGRADE >95
5>select Studentsname ,SCGRADE from Student inner join SC on StuentSNO=SCSNO where SCCNO=(select CNO from C where CNAME='ACCESS') order by SCGREDE dec
6> select sno ,sname ,sdept from Student where sname like '王%'
有错的地方请指点!
(1)select from sales where qty between 1000 and 10000; (2)select gname,price,type,qty from goods,sales where goodsg#=salesg# and fact='青岛海尔集团' and s# in(select s# from shops where sname='北京东方大厦') (3)select g# from (select g#,max(aaqty) from (select g#,AVG(QTY) as aqty from sales group by g#) as a group by g#) as b 本来这题用top 做简单、但是考虑到有销售量相同的、还是用上面这个 (4)delete from sales where qty is null (5)create view S_VIEW as select from shops where addr like '南京路%'
以上就是关于设有学生-课程关系数据库,它由三个关系组成。它们的模式是:学生S(学号S#,姓名SN,所在系SD,年龄SA)、全部的内容,包括:设有学生-课程关系数据库,它由三个关系组成。它们的模式是:学生S(学号S#,姓名SN,所在系SD,年龄SA)、、急!关于数据库、设有一个学生-课程数据库,包括学生关系Student、课程关系C和选修关系SC.等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)