河南成教 / 数据库
正确率:100%
3、在Oracle中,以下是STUDENTS表的结构: SID NUMBER NOT NULL,Primary Key SNAME VARCHAR2(30) COURSE_ID VARCHAR2(10) NOT NULL MARKS NUMBER 你需要查询参加了课程ID为C10的考试,并且分数排在前10名的学生,以下( )语句能够实现此功能。SELECT SID,marks,ROWNUM "Rank" FORM students
A. WHERE ROWNUM<=10 AND course_id='C10' ORDER BY marks DESC;SELECT SID,marks,ROWNUM"Rank" FORM students
B. WHERE ROWNUM<=10 AND course_id='C10' ORDER BY marks;SELECT SID,marks,ROWNUM"Rank" FORM (SELECT SID ,marks FORM students
C. WHERE ROWNUM<=10 AND course_id='C10') ORDER BY marks DESC;SELECT SID,marks,ROWNUM"Rank" FORM (SELECT SID ,marks FORM students
D. WHERE course_id='C10' ORDER BY marks DESC) WHERE ROWNUM<=10;
A. WHERE ROWNUM<=10 AND course_id='C10' ORDER BY marks DESC;SELECT SID,marks,ROWNUM"Rank" FORM students
B. WHERE ROWNUM<=10 AND course_id='C10' ORDER BY marks;SELECT SID,marks,ROWNUM"Rank" FORM (SELECT SID ,marks FORM students
C. WHERE ROWNUM<=10 AND course_id='C10') ORDER BY marks DESC;SELECT SID,marks,ROWNUM"Rank" FORM (SELECT SID ,marks FORM students
D. WHERE course_id='C10' ORDER BY marks DESC) WHERE ROWNUM<=10;
参考答案:
佳题速递: