在学生选课数据库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’
第1题
A、select student.* , cno, grade from student join sc on student.sno=sc.sno
B、select student.* , sc.* 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 , sc where student.sno=sc.sno
第2题
A、select count(cno) from sc
B、select count(sno) from sc
C、select count(*) from sc
D、select count(distinct sno) from sc
第3题
第4题
学生基本信息:s(S#,SNAME,SEX.AGE)
选课信息:SC(s#,C#,GRADE)
课程信息:C(c#,CNAME.TEAC|-IER)
若要“查询选修了3门以上课陧的学生的学生号”,正确的SQL语句是---。
A.SEI,ECT’S#FROM SC GROI.JP BY S#l"lAVING COtJNT(*)>3
B.SELECT S# FROM SC GROIJP BY S撑WHERE COLINT(*)>3
C.SELECl’S#FROM SC ORDER BY S#HAVING C0UNT(*)>3
D.SELECT.S#FROM SC ORDER BY S#WHERE COUNT(*)>3
第5题
A、create view view1 as select sno,avg(grade) from sc group by sno
B、create view view2 as select sno,sname,sdept from student where sdept='CS'
C、create view view3 as select sno,sage+20 from student where ssex='女'
D、create view view4 as select student.sno,sname,sc.sno,cno,grade from sc,student where sc.sno=student.sno and cno='1'
第6题
A、create view view4 as select student.sno,sname,sc.sno,cno,grade from sc,student where sc.sno=student.sno and cno='1' 1
B、create view view2 as select sno,sname,sdept from student where sdept='CS' 2
C、create view view3 as select sno,sage+20 from student where ssex='女' 3
D、create view view1 as select sno,avg(grade) from sc group by sno 4
第7题
A、SELECT DISTINCT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno;
B、SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno;
C、SELECT DISTINCT Sno, DISTINCT Sname FROM Student WHERE Student.Sno IN (SELECT Sno FROM SC);
D、SELECT Sno, Sname FROM Student WHERE Student.Sno IN (SELECT DISTINCT Sno FROM SC);
第8题
A.1:1,1:n
B.1:n,1:n
C.n:1. ,n :m
D.n:m.n:m
第9题
第10题
A、删除student表中的记录
B、修改student表中某条记录的sno值
C、向sc表中插入一条记录
D、修改sc表中某条记录的sno值
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!