以下()操作实现了student表与sc之间的自然连接。
A. select student.* , sc.* from student , sc where student.sno=sc.sno
B. select student.* , cno, grade from student , sc where student.sno=sc.sno
C. select student.sno, sname,ssex,sage,sdept , cno, grade from student , sc where student.sno=sc.sno
D. select student.* , cno, grade from student join sc on student.sno=sc.sno
查看答案
在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下()SQL语句可以实现查询选修了'C002'号课程的学生姓名。
A. select sname from student, sc where student.sno=sc.sno and cno='C002'
B. select sname from student where sno in (select sno from sc where cno='C002')
C. select sname from student where sno = (select sno from sc where cno='C002')
D. select sname from student where exixts (select * from sc where student.sno=sc.sno and cno='C002')
在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下()SQL语句可以实现查询没有选修'C002'号课程的学生姓名。
A. select sname from student, sc where student.sno=sc.sno and cno !='C002'
B. select sname from student where sno not in (select sno from sc where cno='C002')
C. select sname from student where exixts (select * from sc where student.sno=sc.sno and cno<>'C002')
D. select sname from student where not exixts (select * from sc where student.sno=sc.sno and cno='C002')
在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下()SQL语句可以实现查询“CS”系并且年龄超过20岁的学生姓名。
A. select sname from student where sdept=’CS‘ and sage>20
B. select sname from student where sdept=’CS‘intersectselect sname from student wheresage>20
C. select sname from student where sdept=’CS‘exceptselect sname from student wheresage<=20
D. select sname from student where sdept=’CS‘unionselect sname from student wheresage>20
关于视图的作用,以下描述正确的是()。
A. 视图能够简化用户的操作
B. 视图使用户能以多种角度看待同一数据
C. 视图对重构数据库提供了一定程度的逻辑独立性
D. 视图能够对机密数据提供安全保护