A: Sno上的索引
B: Cno上的索引
C: Sno,Cno上的索引
D: SC上的视图SC_V(Sno,Cno)
举一反三
- 基于学生—选课—课程数据库中的三个基本表:学生的信息表: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="
- 已知学生选课信息表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=
- 查询所有有成绩的学生学号和课程号。正确的SELECT语句是()。 A: Select sno , cno from sc where grade < > null B: Select sno as 学号, cno as 课程号 from sc where grade is not null C: Select sno , cno from sc where grade !=‘ ’ D: Select sno , cno from sc where grade is not null
- 检索选修了课程”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’);
内容
- 0
在“学生-选课-课程”数据库中的3个关系如下:S(SNO, SNAME, SEX, AGE); C(CNO, CNAME, TEACHER);SC(SNO, CNO, GRADE),查询既选修了“2”号又选修了“4”号课程的学生学号。若用关系代数表达式来表示为( )。 A: ПSNO (σCNO=’2’(SC) ∩ σCNO=’4’(SC) ) B: ПSNO (σCNO=’2’(SC)) ¥ ПSNO(σCNO=’4’(SC) ) C: ПSNO (σCNO=’2’(SC) ∪ σCNO=’4’(SC) ) D: σCNO=’2’(SC) ¥σCNO=’4’(SC)
- 1
查询选课关系SC(Sno,Cno,Score)表中还没有给定成绩()的课程号()和学号(),下列语句正确的是。() A: SELECT<br/>Sno,Cno<br/>FROM SC WHERE Score IS NULL B: SELECT*<br/>FROM SC WHERE Score =NULL C: SELECT<br/>Sno,Cno<br/>FROM SC D: SELECT<br/>Score FROM SC WHERE Sno,Cno<br/>IS NOT NULL
- 2
检索选修课程“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' );
- 3
查询实现同时选修了C1和C2号课程的学生学号,下列代码正确的是( )。 A: SELECT sno FROM SC WHERE Cno='C1' AND Cno='C2'; B: SELECT sno FROM SC WHERE Cno='C1' AND Sno IN ( SELECT sno FROM SC WHERE Cno='C2' );
- 4
“查询没有学习成绩的学生的学号和课程号”的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 = ' '