下列SQL语句中,_____________可以在“学生-课程”数据库正确实现“查询学生201215012选修课程的总学分数”。
A: SELECT COUNT(Ccredit)FROM SC, CourseWHER Sno='201215012'
B: SELECT COUNT(Ccredit)FROM SC, CourseWHER Sno='201215012' AND SC.Cno=Course.Cno
C: SELECT SUM(Ccredit)FROM SC, CourseWHER Sno='201215012'
D: SELECT SUM(Ccredit)FROM SC, CourseWHER SC.Cno=Course.Cno AND Sno='201215012'
A: SELECT COUNT(Ccredit)FROM SC, CourseWHER Sno='201215012'
B: SELECT COUNT(Ccredit)FROM SC, CourseWHER Sno='201215012' AND SC.Cno=Course.Cno
C: SELECT SUM(Ccredit)FROM SC, CourseWHER Sno='201215012'
D: SELECT SUM(Ccredit)FROM SC, CourseWHER SC.Cno=Course.Cno AND Sno='201215012'
举一反三
- 查询选修了'数据库基础'课程的同学的学号,和这些同学选修的全部课程号和分数.select sno,cno,gradefrom ______________________ A: sc where sno in (select sno from sc join course on sc.cno=course.cno where cname='数据库基础') B: sc join course on sc.cno=course.cno where cname='数据库基础' C: sc where sno in (select sno from course where cname='数据库基础') D: sc where cno in (select cno from course where cname='数据库基础')
- 以下SQL语句中,____________可以在“学生-课程”数据库正确实现“查询选修了课程的学生总人数”。 A: SELECT COUNT(Sno)FROM SC B: SELECT COUNT(DISTINCT Sno)FROM SC C: SELECT COUNT(*)FROM SC D: SELECT SUM(Sno)FROM SC
- 已知学生选课信息表sc(sno, cno, degree)。查询“至少选修了一门课程,但没有成绩的学生学号和课程号”的SQL语句是( )。 A: SELECT sno, cno FROM sc WHERE degree=NULL; B: SELECT sno, cno FROM sc WHERE degree IS ''; C: SELECT sno, cno FROM sc WHERE degree IS NULL; D: SELECT sno, cno FROM sc WHERE degree='';
- 已知学生选课信息表:sc(sno,cno,grade)。查询“至少选修了一门课程,但没有学习成绩的学生学号和课程号”的SQL语句是( )。 A: SELECT sno,cno FROM sc WHERE grade=NULL B: SELECT sno,cno FROM sc WHERE grade IS C: SELECT sno,cno FROM sc WHERE grade IS NULL D: SELECT sno,cno FROM sc WHERE 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