题目
[单选题]
8、在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下哪条语句可以实现查询选了课的学生人数()。
A.select count(*) from sc
B.select count(sno) from sc
C.select count(distinct sno) from sc
D.select count(cno) from sc
答案
D、select count(cno) from sc
更多“8、在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是…”相关的问题
第1题
在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下哪条语句可以实现查询选了课的学生人数()。
A.select count(*) from sc
B.select count(sno) from sc
C.select count(distinct sno) from sc
D.select count(cno) from sc
点击查看答案
第2题
在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下哪条语句可以实现查询选了课的学生人数()。
A.select count(*) from sc
B.select count(sno) from sc
C.select count(distinct sno) from sc
D.select count(cno) from sc
点击查看答案
第3题
在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下哪条语句可以实现查询选了课的学生人数()。
A.select count(*) from sc
B.select count(sno) from sc
C.select count(distinct sno) from sc
D.select count(cno) from sc
点击查看答案
第4题
"教学管理"数据库中有学生表、课程表和选课表,为了有效地反映这3张表中的数据之间的联系,在创建数据库后应该设置
点击查看答案
第5题
【单选题】“教学管理”数据库中有学生表、课程表和选课表,为了有效地反映这三张表中数据之间的联系,在创建数据库时应设置()。
A.默认值
B.有效性规则
C.索引
D.表之间的关系
点击查看答案
第6题
在学生选课数据库S_T中,有学生表student(sno,sname,ssex,sage,sdept),sno是主键;课程表course(cno,cname,cpno,credit),cno是主键;学生选课表sc(sno,cno,grade),主键是sno+cno。sc表的外键sno参照student表的主键sno,sc表的外键cno参照course表的主键cno。以下()操作可能会违背参照完整性约束。
A.删除student表中的记录
B.修改student表中某条记录的sno值
C.向sc表中插入一条记录
D.修改sc表中某条记录的sno值
点击查看答案
第7题
在学生选课数据库中有学生表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程序设计'
点击查看答案
第8题
在学生选课数据库中有学生表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程序设计'
点击查看答案
第9题
在学生选课数据库中有学生表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程序设计'
点击查看答案