A: select student.sno,sname from student,sc where student.sno=sc.sno and grade>90
B: select student.sno,sname from student,sc where grade>90
C: select sno,sname from sc where grade>90
D: select sno,grade from student where grade>90
举一反三
- 查询每个学生的学号、姓名、选修的课程名及成绩,下列()的操作是正确的。 A: select student,sno,sname,grade from student,sc where student.sno=sc.sno and sc.cno=course.cno B: select student,sno,sname,grade from student,sc,cource where student.sno=sc.sno C: select student,sno,sname,grade from student,sc,cource where sc.cno=course.cno D: select student,sno,sname,grade from student,sc,cource where student.sno=sc.sno and sc.cno=course.cno
- 在学生选课数据库中,查询选修了课程的学生的学号、姓名,SQL语句可为( ) A: SELECT DISTINCT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; B: SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; C: SELECT DISTINCT Sno, DISTINCT Sname FROM Student WHERE Student.Sno IN (SELECT Sno FROM SC); D: SELECT Sno, Sname FROM Student WHERE Student.Sno IN (SELECT DISTINCT Sno FROM SC);
- 三个表学生表S、课程表C 和学生选课表SC,它们的结构如下S(S#,SN,SEX,AGE,DEPT) C(C#,CN) SC(S#,C#,GRADE) 其中:S#为学号,SN 为姓名,SEX 为性别,AGE 为年龄,DEPT 为系别,C#为课程号,CN 为课程名,GRADE 为成绩。 检索选修课程“C2”的学生中成绩最高的学生的学号,正确的 SELECT 语句是 A: ELECT S# FORM SC WHERE C#=’C2’ AND GRAD>=(SELECT GRADE FORM SC WHERE C#=’C2’) B: SELECT S# FORM SC WHERE C#=’C2’ AND GRADE IN (SELECT GRADE FORM SC WHERE C#=’C2’) C: SELECT S# FORM SC WHERE C#=’C2’ AND GRADE NOT IN (SELECT GRADE FORM SC WHERE C#=’C2’) D: SELECT S# FORM SC WHERE C#=’C2’ AND GRADE>=ALL (SELECT GRADE FORM SC WHERE C#=’C2’)
- 基于学生—选课—课程数据库中的三个基本表:学生的信息表: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="
- 有关系S(S#,SNAME,SAGE),C(C#,CNAME),SC(S#,C#,GRADE)。若要查找分数(grade)不及格的学生姓名(sname),则以上正确的有?( ) A: SELECT sname FROM s, sc WHERE grade<60 B: SELECT sname FROM s WHERE sno IN(SELECT Cno FROM sc WHERE grade<60) C: SELECT sname FROM s, sc WHERE s.sno=sc.sno AND grade<60 D: SELECT sname FROM s, sc WHERE s.sno=sc.sno OR grade<60
内容
- 0
对于学生信息表:student(sno,sname,sex,age,grade),查询学习成绩为空的学生的学号和姓名,下面语句正确的是 A: SELECT sno,sname FROM student WHERE grade=NULL B: SELECT sno,sname FROM student WHERE grade IS NULL C: SELECT sno,age FROM student WHERE grade IS NULL D: SELECT sno,age FROM student WHERE grade=NULL
- 1
现有学生表S、课程表C和学生选课表SC,它们的结构如下: S(S#, SN, SEX, AGE, DEPT) C(C#, CN,TEACHER) SC(S#, C#, GRADE) 其中:S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号,CN为课程名,GRADE为成绩。要查找选修数据库技术这门课的学生姓名和成绩,可使用如下的语句:SELECT SN,GRADE FROM S,SC,C WHERE CN=‘数据库技术’ AND S.S#=SC.S# AND _____________
- 2
三个表学生表S、课程表C 和学生选课表<br/>SC,它们的结构如下:<br/>S(S#,SN,SEX,AGE,DEPT)<br/>C(C#,CN)<br/>SC(S#,C#,GRADE)<br/>其中:S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号,CN为课程名,GRADE为成绩。<br/>检索学生姓名及其所选修课程的课程号和成绩。正确的 SELECT 语句是( )。 A: SELECT<br/>S,SN,SC#,SC.GRADE<br/>FROM S WHERE B: SELECT C: SELECT D: SELECT E: S#=SS# F: SN,SC#,SC.GRADE FROM SC WHERE G: S#=SGRADE H: SN,SC#,SC.GRADE FROM S,SC WHERE I: S#=SS# J: SN,SC#,SC.GRADE FROM K: SC
- 3
三个表学生表S、课程表C 和学生选课表 SC,它们的结构如下: S(S#,SN,SEX,AGE,DEPT)<br/>C(C#,CN)<br/>SC(S#,C#,GRADE)<br/>其中:S#为学号,SN 为姓名,SEX 为性别,AGE 为年龄,DEPT 为系别,C#为课程号,CN 为课程名,GRADE 为成绩。<br/>检索学生姓名及其所选修课程的课程号和成绩。正确的 SELECT 语句是( )。 A: SELECT S,SN,SC#,SC.GRADE FROM S WHERE S.S#=SC.S# B: SELECT SN,SC.C#,SC.GRADE FROM SC WHERE S.S#=SC.GRADE C: SELECT SN,SC.C#,SC.GRADE FROM S,SC WHERE S.S#=SC.S D: SELECT SN,SC.C#,SC.GRADE FROM S.SC
- 4
3个表即学生表S、课程表C和学生选课表SC,它们的结构如下: S(S#,SN,SEX,AGE,DEPT)C(C#,CN)SC(S#,C#,GRADE)其中:S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号,CN为课程名,GRADE为成绩。检索选修课程名称为“DB”的男生中的最高成绩,正确的SELECT语句是____。 A: SELECT MAX(GRADE) FROM SC WHERE CN='DB’ AND SEX='男' B: SELECT MAX(GRADE) FROM SC,C,SWHERE CN='DB' AND SEX='男' C: SELECT MAX(GRADE) FROM SC,S WHERE SC D: =C E: AND CN='DB' AND SEX='男' F: SELECT MAX(GRADE) FROM SC,C,SWHERE SC G: =C H: AND SS I: =S.S J: AND CN='DB' AND SEX='男'