在学生选课数据库中,将所有选了课程‘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;
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;
举一反三
- 检索选修了课程”C1”的学生中成绩最高的学生的学号,正确的SELECT语句为( ) A: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE >=ALL (SELECT Grade FROM SC WHERE Cno=’C1’); B: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE IN (SELECT Grade FROM SC WHERE Cno=’C1’); C: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE > ANY (SELECT Grade FROM SC WHERE Cno=’C1’); D: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE >= (SELECT Grade FROM SC WHERE Cno=’C1’);
- 检索选修课程“C2”的学生中成绩最高的学生的学号。正确的SELECT语句是()。 A: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ( SELECT GRADE FORM SC WHERE CNO='C2' ); B: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); C: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE NOT IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); D: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ALL ( SELECT GRADE FORM SC WHERE CNO='C2' );
- 已知学生选课信息表: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=
- 查询编号为'c01'的课程考试成绩在80-89之间的学生的学号,下列()语句不能实现。 A: select sno ,grade from sc where cno='c01' and grade between 80 and 89 B: select sno ,grade from sc where cno='c01' and grade>=80 and grade<90 C: select sno ,grade from sc where cno='c01' and not (grade90) D: select sno ,grade from sc where cno='c01' and grade in (80-89)
- “查询没有学习成绩的学生的学号和课程号”的SQL语 句是( ) (2.0) 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 = ' '