把’数据库原理‘课程分数小于60分的同学的‘数据库原理’课程分数加5分。update _______set grade=grade+5from _________________________where ________________________
A: sc ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade<60
B: course ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade<60
C: sc ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade
A: sc ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade<60
B: course ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade<60
C: sc ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade
举一反三
- 查询选修了'数据库基础'课程的同学的学号,和这些同学选修的全部课程号和分数.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='数据库基础')
- 在学生选课数据库中,将所有选了课程‘DB’且分数在60~70分之间的学生的成绩增加百分之十,SQL语句为( ) A: UPDATE SC SET Grade=Grade*1.1 WHERE Cno=’DB’ AND Grade BETWEEN 60 AND 70; B: UPDATE SC SET Grade+=Grade*0.1 WHERE Cno=(Select Cno From Course WHERE Cname=’DB’) AND Grade >= 60 AND Grade <=70; C: UPDATE SC SET Grade=Grade*1.1 WHERE Cno=(Select Cno From Course WHERE Cname=’DB’) AND Grade <= 60 AND Grade >=70; D: UPDATE SC SET Grade=Grade*1.1 WHERE Cno IN (Select Cno From Course WHERE Cname=’DB’) AND Grade BETWEEN 60 AND 70;
- 在“学生-选课-课程”数据库中的3个关系如下:S(SNO, SNAME, SEX, AGE); C(CNO, CNAME, TEACHER);SC(SNO, CNO, GRADE),查找选修“数据库原理”这门课程学生的学生名和成绩,若用关系代数表达式来表示为______。( ) A: ПSNAME, GRADE (σCNAME=’数据库原理’(C) ПSNO, CNO, GRADE (SC) ПSNO, SNAME (S) ) B: ПSNAME, GRADE (σCNAME=’数据库原理’(C) SC S) C: ПSNAME, GRADE (σCNAME=’数据库原理’ (ПCNAME (C)) ПSNO, CNO, GRADE (SC) ПSNO, SNAME (S) ) D: ПSNAME, GRADE (C SC SC)
- 同时选修了‘数据结构’和‘操作系统’2门课程的同学学号、姓名。select student.sno,sname from student,sc,coursewhere student.sno=sc.sno and course.cno=sc.cnoand _________________________________________________ A: cname='数据结构' and student.sno in(select sno from sc,course where sc.cno=course.cno and cname='操作系统') B: cname='操作系统' and student.sno in(select sno from sc,course where sc.cno=course.cno and cname='数据结构') C: cname='数据结构' and cname='操作系统' D: student.sno in(select sno from sc,course where sc.cno=course.cno and cname='操作系统'and cname='数据结构')
- 基于学生—选课—课程数据库中的三个基本表:学生的信息表:STUDENT(sno, sname, sex, age, dept)主码为sno课程信息表:COURSE(cno,cname, teacher)主码为cno学生选课信息表:SC(sno, cno, grade)主码为(sno, cno) “查询没有学习成绩的学生的学号和课程号”的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="