第1题
在学生选课数据库S_T中,有: 学生表student(sno,sname,ssex,sage,sdept), 课程表course(cno,cname,cpno,ccredit), 选课表sc(sno,cno,grade)。 针对数据库S_T,可以利用以下视图更新数据。 create view view7 as select student.sno,sname,cno,grade from sc,student where sc.sno=student.sno and cno=’1’
第2题
在学生选课数据库S_T中,有: 学生表student(sno,sname,ssex,sage,sdept), 课程表course(cno,cname,cpno,ccredit), 选课表sc(sno,cno,grade)。 以下是所有计算机系’CS’的学生的视图定义,并且student中学号为’200215123’的学生是数学系’MA’的。以下()命令可正确执行且受影响的行数大于等于1。 create view CS_student as select sno,sname,ssex,sage,sdept from student where sdept=’CS’ with check option
A、insert into CS_student values(’200215128’,’Tom’,’男’,21,’MA’)
B、insert into CS_student values(’200215129’,’Mike’,’男’,20,’CS’)
C、update CS_student set sdept=’IS’ where sno=’200215123’
D、delete from CS_student where sno=’200215123’
第3题
A、select * from student order by sdept , sage
B、select sname, sdept, sage from student order by sdept , sage desc
C、select sname, sdept, sage from student order by sdept desc , sage
D、select * from student order by sdept desc, sage
第4题
在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。查询至少选修了“201815005”同学所选课程的学生的姓名,可以使用如下SQL语句。 select sname from student s where sno<>‘201815005’ and not exists (select * from sc x where x.sno=’201815005’ and not exists (select * from sc y where y.cno=x.cno and y.sno=s.sno ) )
第5题
A、select sname from student where sdept=’CS‘ and sage>20
B、select sname from student where sdept=’CS‘ intersect select sname from student where sage>20
C、select sname from student where sdept=’CS‘ except select sname from student where sage<=20<br> D、select sname from student where sdept=’CS‘ union select sname from student where sage>20
第6题
第7题
在学生选课数据库S_T中,有: 学生表student(sno,sname,ssex,sage,sdept), 课程表course(cno,cname,cpno,ccredit), 选课表sc(sno,cno,grade)。 以下是所有计算机系’CS’的学生的视图定义,并且student中学号为’200215123’的学生是数学系’MA’的。 create view CS_student as select sno,sname,ssex,sage,sdept from student where sdept=’CS’ with check option 以下()命令可正确执行且受影响的行数大于等于1。
A、update CS_student set sdept=’IS’ where sno=’200215123’ 1
B、delete from CS_student where sno=’200215123’ 2
C、insert into CS_student values(’200215128’,’Tom’,’男’,21,’MA’) 3
D、insert into CS_student values(’200215129’,’Mike’,’男’,20,’CS’) 4
第8题
在学生选课数据库S_T中,有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname,cpno,ccredit),选课表sc(sno,cno,grade)。其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,cpno是先行课号,ccredit是学分, grade是成绩。以下是所有计算机系’CS’的学生的视图定义,并且student中学号为’200215123’的学生是数学系’MA’的。以下()命令可正确执行且受影响的行数等于1。 create view CS_student as select sno,sname,ssex,sage,sdept from student where sdept=’CS’ with check option
A、delete from CS_student where sno=’200215123’
B、update CS_student set sdept=’IS’ where sno=’200215123’
C、insert into CS_student values(’200215129’,’Mike’,’男’,20,’CS’)
D、insert into CS_student values(’200215128’,’Tom’,’男’,21,’MA’)
第9题
第10题
在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。要查询选修了“Java程序设计”课的的学生姓名,则SQL语句是: select sname from student,sc ,course where 子句。 这里的where子句的内容是()。
A、student.sno=sc.sno and sc.cno=course.cno and cname=’Java程序设计’
B、cname=’Java程序设计’
C、student.sno=sc.sno and cname=’Java程序设计’
D、sc.cno=course.cno and cname=’Java程序设计’
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!