单选题Examine the description of the MARKS table: STD_ID NUMBER(4) STUDENT_NAME VARCHAR2(30) SUBJ1 NUMBER(3) SUBJ2 NUMBER(3) SUBJ1 and SUBJ2 indicate the marks obtained by a student in two subjects. Examine this SELECT statement based on the MARKS table: SEL

题目
单选题
Examine the description of the MARKS table: STD_ID NUMBER(4) STUDENT_NAME VARCHAR2(30) SUBJ1 NUMBER(3) SUBJ2 NUMBER(3) SUBJ1 and SUBJ2 indicate the marks obtained by a student in two subjects. Examine this SELECT statement based on the MARKS table: SELECT subj1+subj2 total_marks, std_id FROM marks WHERE subj1 > AVG(subj1) AND subj2 > AVG(subj2) ORDER BY total_ marks; What is the result of the SELECT statement?()
A

The statement executes successfully and returns the student ID and sum of all marks for each student who obtained more than the average mark in each subject.

B

The statement returns an error at the SELECT clause.

C

The statement returns an error at the WHERE clause.

D

The statement returns an error at the ORDER BY clause.


相似考题
更多“单选题Examine the description of the MARKS table: STD_ID NUMBER(4) STUDENT_NAME VARCHAR2(30) SUBJ1 NUMBER(3) SUBJ2 NUMBER(3) SUBJ1 and SUBJ2 indicate the marks obtained by a student in two subjects. Examine this SELECT statement based on the MARKS table: SEL”相关问题
  • 第1题:

    Examine the description of the MARKS table: STD_ID NUMBER(4) STUDENT_NAME VARCHAR2(30) SUBJ1 NUMBER(3) SUBJ2 NUMBER(3) SUBJ3 NUMBER(3) SUBJ1, SUBJ2, and SUBJ3 indicate the marks (grades) obtained by a student in the three subjects. Which two statements are valid? ()

    • A、SELECT SUM(subj1, subj2, subj3) FROM marks;
    • B、SELECT SUM(subj1 + subj2 + subj3) FROM marks;
    • C、SELECT SUM(subj1), SUM(subj2), SUM(subj3) FROM marks;
    • D、SELECT MAX(subj1, subj2, subj3) FROM marks;
    • E、SELECT MINIMUM(subj1) FROM marks;
    • F、SELECT COUNT(std_id) FROM marks WHERE subj1 >= AVG(subj1);

    正确答案:B,C

  • 第2题:

    You need to design a student registration database that contains several tables storing academic information. The STUDENTS table stores information about a student. The STUDENT_GRADES table stores information about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key. You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table that points to the STUDENT_ID column of the STUDENTS table. Which statement creates the foreign key?()

    • A、CREATE TABLE student_grades (student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk REFERENCES (student_id) FOREIGN KEY student (student_id));
    • B、CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));
    • C、CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT FOREIGN KEY (student_id) REFERENCES student (student_id));
    • D、CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));

    正确答案:D

  • 第3题:

    Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHARD2(30) SALARY NUMBER(8,2) Which statement shows the maximum salary paid in each job category of each department?()

    • A、SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary > MAX (salary);
    • B、SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;
    • C、SELECT dept_id, job_cat, MAX(salary) FROM employees;
    • D、SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;
    • E、SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;

    正确答案:B

  • 第4题:

    Which SQL statement defines a FOREIGN KEY constraint on the DEPTNO column of the EMP table?()

    • A、CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);
    • B、CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));
    • C、CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));
    • D、CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));

    正确答案:B

  • 第5题:

    Examine the description of the STUDENTS table: STD_ID NUMBER(4) COURSE_ID VARCHAR2(10) START_DATE DATE END_DATE DATE Which two aggregate functions are valid on the START_DATE column? ( )

    • A、SUM(start_date)
    • B、AVG(start_date)
    • C、COUNT(start_date)
    • D、AVG(start_date,end_date)
    • E、MIN(start_date)
    • F、MAXIMUM(start_date)

    正确答案:C,E

  • 第6题:

    Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()

    • A、SER_NO
    • B、ORDER_ID
    • C、STATUS
    • D、PROD_ID
    • E、ORD_TOTAL
    • F、composite index on ORDER_ID and ORDER_DATE

    正确答案:A,F

  • 第7题:

    单选题
    Examine the description of the MARKS table: STD_ID NUMBER(4) STUDENT_NAME VARCHAR2(30) SUBJ1 NUMBER(3) SUBJ2 NUMBER(3) SUBJ1 and SUBJ2 indicate the marks obtained by a student in two subjects. Examine this SELECT statement based on the MARKS table: SELECT subj1+subj2 total_marks, std_id FROM marks WHERE subj1 > AVG(subj1) AND subj2 > AVG(subj2) ORDER BY total_marks; What is the result of the SELECT statement?()
    A

    The statement executes successfully and returns the student ID and sum of all marks for each student who obtained more than the average mark in each subject.

    B

    The statement returns an error at the SELECT clause.

    C

    The statement returns an error at the WHERE clause.

    D

    The statement returns an error at the ORDER BY clause.


    正确答案: C
    解析: 暂无解析

  • 第8题:

    多选题
    Examine the description of the MARKS table: STD_ID NUMBER(4) STUDENT_NAME VARCHAR2(30) SUBJ1 NUMBER(3) SUBJ2 NUMBER(3) SUBJ3 NUMBER(3) SUBJ1, SUBJ2, and SUBJ3 indicate the marks (grades) obtained by a student in the three subjects. Which two statements are valid? ()
    A

    SELECT SUM(subj1, subj2, subj3) FROM marks;

    B

    SELECT SUM(subj1 + subj2 + subj3) FROM marks;

    C

    SELECT SUM(subj1), SUM(subj2), SUM(subj3) FROM marks;

    D

    SELECT MAX(subj1, subj2, subj3) FROM marks;

    E

    SELECT MINIMUM(subj1) FROM marks;

    F

    SELECT COUNT(std_id) FROM marks WHERE subj1 >= AVG(subj1);


    正确答案: D,F
    解析: 暂无解析

  • 第9题:

    多选题
    Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()
    A

    SER_NO

    B

    ORDER_ID

    C

    STATUS

    D

    PROD_ID

    E

    ORD_TOTAL

    F

    composite index on ORDER_ID and ORDER_DATE


    正确答案: A,F
    解析: 暂无解析

  • 第10题:

    单选题
    Examine the description of the MARKS table: STD_ID NUMBER(4) STUDENT_NAME VARCHAR2(30) SUBJ1 NUMBER(3) SUBJ2 NUMBER(3) SUBJ1 and SUBJ2 indicate the marks obtained by a student in two subjects. Examine this SELECT statement based on the MARKS table: SELECT subj1+subj2 total_marks, std_id FROM marks WHERE subj1 > AVG(subj1) AND subj2 > AVG(subj2) ORDER BY total_ marks; What is the result of the SELECT statement? ()
    A

    The statement executes successfully and returns the student ID and sum of all marks for each student who obtained more than the average mark in each subject.

    B

    The statement returns an error at the SELECT clause.

    C

    The statement returns an error at the WHERE clause.

    D

    The statement returns an error at the ORDER BY clause.


    正确答案: C
    解析: 暂无解析

  • 第11题:

    单选题
    Examine the structure of the STUDENTS table: STUDENT_ID NUMBER NOT NULL, Primary Key STUDENT_NAME VARCHAR2(30) COURSE_ID VARCHAR2(10) NOT NULL MARKS NUMBER START_DATE DATE FINISH_DATE DATE You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999. Which SQL statement accomplishes this task?()
    A

    SELECT student_ id, marks, ROWNUM Rank FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99 AND course_id = 'INT_SQL' ORDER BY mark DESC;

    B

    SELECT student_id, marks, ROWID Rank FROM students WHERE ROWID <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY mark;

    C

    SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC- 99' AND course_id = 'INT_SQL' ORDER BY mark DESC;

    D

    SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE (finish_date BETWEEN '01-JAN-99 AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC) WHERE ROWNUM <= 10;

    E

    SELECT student id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students ORDER BY marks) WHERE ROWNUM <= 10 AND finish date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id 'INT_SQL';


    正确答案: D
    解析: 暂无解析

  • 第12题:

    多选题
    Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()
    A

    SER_NO

    B

    ORDER_ID

    C

    STATUS

    D

    PROD_ID

    E

    ORD_TOTAL

    F

    composite index on ORDER_ID and ORDER_DATE


    正确答案: F,C
    解析: 暂无解析

  • 第13题:

    Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) Which statement produces the number of different departments that have employees with last name Smith?()

    • A、SELECT COUNT(*) FROM employees WHERE last_name='Smith';
    • B、SELECT COUNT(dept_id) FROM employees WHERE last_name='Smith';
    • C、SELECT DISTINCT(COUNT(dept_id)) FROM employees WHERE last_name='Smith';
    • D、SELECT COUNT(DISTINCT dept_id) FROM employees WHERE last_name='Smith';
    • E、SELECT UNIQUE(dept_id) FROM employees WHERE last_name='Smith';

    正确答案:D

  • 第14题:

    Examine the data in the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_ID 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 IT_ADMIN 5000 106 Smith 40 110 AD_ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EX_DIR 8000 120 Ravi 20 110 SA*DIR 6500 DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME 10 Admin 20 Education 30 IT 40 Human Resources Also examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables: CREATE TABLE departments (department_id NUMBER PRIMARY KEY, department _ name VARCHAR2(30)); CREATE TABLE employees (EMPLOYEE_ID NUMBER PRIMARY KEY, EMP_NAME VARCHAR2(20), DEPT_ID NUMBER REFERENCES departments(department_id), MGR_ID NUMBER REFERENCES employees(employee id), MGR_ID NUMBER REFERENCES employees(employee id), JOB_ID VARCHAR2(15). SALARY NUMBER); ON the EMPLOYEES, On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. DEPT_ID is foreign key to DEPARTMENT_ID column of the DEPARTMENTS table. On the DEPARTMENTS table, DEPARTMENT_ID is the primary key. Examine this DELETE statement: DELETE FROM departments WHERE department id = 40; What happens when you execute the DELETE statement?()

    • A、Only the row with department ID 40 is deleted in the DEPARTMENTS table.
    • B、The statement fails because there are child records in the EMPLOYEES table with department ID 40.
    • C、The row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 110 and 106 are deleted from the EMPLOYEES table.
    • D、The row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 106 and 110 and the employees working under employee 110 are deleted from the EMPLOYEES table.
    • E、The row with department ID 40 is deleted in the DEPARTMENTS table. Also all the rows in the EMPLOYEES table are deleted.
    • F、The statement fails because there are no columns specifies in the DELETE clause of the DELETE statement.

    正确答案:B

  • 第15题:

    Examine the structure of the STUDENTS table: STUDENT_ID NUMBER NOT NULL, Primary Key STUDENT_NAME VARCHAR2(30) COURSE_ID VARCHAR2(10) NOT NULL MARKS NUMBER START_DATE DATE FINISH_DATE DATE You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999. Which SQL statement accomplishes this task? ()

    • A、SELECT student_ id, marks, ROWNUM "Rank" FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99 AND course_id = 'INT_SQL' ORDER BY mark DESC;
    • B、SELECT student_id, marks, ROWID "Rank" FROM students WHERE ROWID <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY mark;
    • C、SELECT student_id, marks, ROWNUM "Rank" FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC- 99' AND course_id = 'INT_SQL' ORDER BY mark DESC;
    • D、SELECT student_id, marks, ROWNUM "Rank" FROM (SELECT student_id, marks FROM students WHERE (finish_date BETWEEN '01-JAN-99 AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC) WHERE ROWNUM <= 10;
    • E、SELECT student id, marks, ROWNUM "Rank" FROM (SELECT student_id, marks FROM students ORDER BY marks) WHERE ROWNUM <= 10 AND finish date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id 'INT_SQL';

    正确答案:D

  • 第16题:

    Examine the structure of the EMP_DEPT_VU view: Column Name Type Remarks EMPLOYEE_ID NUMBER From the EMPLOYEES table EMP_NAME VARCHAR2(30) From the EMPLOYEES table JOB_ID VARCHAR2(20) From the EMPLOYEES table SALARY NUMBER From the EMPLOYEES table DEPARTMENT_ID NUMBER From the DEPARTMENTS table DEPT_NAME VARCHAR2(30) From the DEPARTMENTS table Which SQL statement produces an error?()

    • A、SELECT * FROM emp_dept_vu;
    • B、SELECT department_id, SUM(salary) FROM emp_dept_vu GROUP BY department _ id;
    • C、SELECT department_id, job_id, AVG(salary) FROM emp_dept_vu GROUP BY department _ id, job_id;
    • D、SELECT job_id, SUM(salary) FROM emp_dept_vu WHERE department_id IN (10,20) GROUP BY job_id HAVING SUM (salary) > 20000
    • E、None of the statements produce an error; all are valid.

    正确答案:E

  • 第17题:

    Examine the description of the MARKS table: STD_ID NUMBER(4) STUDENT_NAME VARCHAR2(30) SUBJ1 NUMBER(3) SUBJ2 NUMBER(3) SUBJ1 and SUBJ2 indicate the marks obtained by a student in two subjects. Examine this SELECT statement based on the MARKS table: SELECT subj1+subj2 total_marks, std_id FROM marks WHERE subj1 > AVG(subj1) AND subj2 > AVG(subj2) ORDER BY total_marks; What is the result of the SELECT statement?()

    • A、The statement executes successfully and returns the student ID and sum of all marks for each student who obtained more than the average mark in each subject.
    • B、The statement returns an error at the SELECT clause.
    • C、The statement returns an error at the WHERE clause.
    • D、The statement returns an error at the ORDER BY clause.

    正确答案:C

  • 第18题:

    单选题
    You need to design a student registration database that contains several tables storing academic information. The STUDENTS table stores information about a student. The STUDENT_GRADES table stores information about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key. You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table that points to the STUDENT_ID column of the STUDENTS table. Which statement creates the foreign key?()
    A

    CREATE TABLE student_grades (student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk REFERENCES (student_id) FOREIGN KEY student (student_id));

    B

    CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));

    C

    CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT FOREIGN KEY (student_id) REFERENCES student (student_id));

    D

    CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));


    正确答案: B
    解析: 暂无解析

  • 第19题:

    单选题
    Which SQL statement defines a FOREIGN KEY constraint on the DEPTNO column of the EMP table?()
    A

    CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);

    B

    CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));

    C

    CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));

    D

    CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));


    正确答案: A
    解析: 暂无解析

  • 第20题:

    单选题
    Marks and Nos.,Number and kind of packages,description of goods should be declared in ().
    A

    SHIP'S STORE LIST

    B

    PERSONAL EFFECTS LIST

    C

    CARGO DECLARATION

    D

    GENERAL DECLARATION


    正确答案: C
    解析: 暂无解析

  • 第21题:

    单选题
    Examine the structure of the STUDENTS table: STUDENT_ID NUMBER NOT NULL, Primary Key STUDENT_NAME VARCHAR2(30) COURSE_ID VARCHAR2(10) NOT NULL MARKS NUMBER START_DATE DATE FINISH_DATE DATE You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999. Which SQL statement accomplishes this task? ()
    A

    SELECT student_ id, marks, ROWNUM Rank FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99 AND course_id = 'INT_SQL' ORDER BY mark DESC;

    B

    SELECT student_id, marks, ROWID Rank FROM students WHERE ROWID <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY mark;

    C

    SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC- 99' AND course_id = 'INT_SQL' ORDER BY mark DESC;

    D

    SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE (finish_date BETWEEN '01-JAN-99 AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC) WHERE ROWNUM <= 10;

    E

    SELECT student id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students ORDER BY marks) WHERE ROWNUM <= 10 AND finish date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id 'INT_SQL';


    正确答案: B
    解析: 暂无解析

  • 第22题:

    单选题
    Examine the structure of the STUDENTS table: STUDENT_ID NUMBER NOT NULL, Primary Key STUDENT_NAME VARCHAR2(30) COURSE_ID VARCHAR2(10) NOT NULL MARKS NUMBER START_DATE DATE FINISH_DATE DATE You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999. Which SQL statement accomplishes this task?()
    A

    SELECT student_ id, marks, ROWNUM Rank FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC;

    B

    SELECT student_id, marks, ROWID Rank FROM students WHERE ROWID <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks;

    C

    SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC);

    D

    SELECT student_id, marks, ROWNUM Rank FROM (SELECT student_id, marks FROM students ORDER BY marks DESC) WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id ='INT _ SQL';


    正确答案: D
    解析: 暂无解析

  • 第23题:

    单选题
    Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) Which statement produces the number of different departments that have employees with last name Smith?()
    A

    SELECT COUNT (*) FROM employees WHERE last _name='smith';

    B

    SELECT COUNT (dept_id) FROM employees WHERE last _name='smith';

    C

    SELECT DISTINCT (COUNT (dept_id) FROM employees WHERE last _name='smith';

    D

    SELECT COUNT (DISTINCT dept_id) FROM employees WHERE last _name='smith';

    E

    SELECT UNIQE (dept_id) FROM employees WHERE last _name='smith';


    正确答案: C
    解析: 暂无解析