多选题Which two statements complete a transaction? ()ADELETE employees;BDESCRIBE employees;CROLLBACK TO SAVEPOINT C;DGRANT SELECT ON employees TO SCOTT;EALTER TABLE employees SET UNUSED COLUMN sal;FSELECT MAX(sal) FROM employees WHERE department_id = 20;

题目
多选题
Which two statements complete a transaction? ()
A

DELETE employees;

B

DESCRIBE employees;

C

ROLLBACK TO SAVEPOINT C;

D

GRANT SELECT ON employees TO SCOTT;

E

ALTER TABLE employees SET UNUSED COLUMN sal;

F

SELECT MAX(sal) FROM employees WHERE department_id = 20;


相似考题

2.Examine the structure of the EMPLOYEES table:EMPLOYEE_ID NUMBER NOT NULLEMP_NAME VARCHAR2(30)JOB_ID VARCHAR2(20) DEFAULT ‘SA_REP‘SAL NUMBERCOMM_PCT NUMBERMGR_ID NUMBERDEPARTMENT_ID NUMBERYou need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below:JOB_ID: Default value specified for this column definition.SAL: Maximum salary earned for the job ID SA_REP.COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable.Which UPDATE statement meets the requirements?()A. UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = ‘SA_REP‘) AND comm_pct = DEFAULT AND department_id = &did WHERE employee _id IN (103,115);B. UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = &did WHERE employee_id IN (103,115) AND job _ id = ‘SA_ REP‘;C. UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = ‘SA_REP‘), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115);D. UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115) AND job _ id = ‘SA_ REP‘;E. UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = ‘SA_REP‘) comm_pct = DEFAULT OR NULL, department_id = &did WHERE employee_id IN (103,115);

更多“多选题Which two statements complete a transaction? ()ADELETE employees;BDESCRIBE employees;CROLLBACK TO SAVEPOINT C;DGRANT SELECT ON employees TO SCOTT;EALTER TABLE employees SET UNUSED COLUMN sal;FSELECT MAX(sal) FROM employees WHERE department_id = 20;”相关问题
  • 第1题:

    Click the Exhibit button and examine the data in the EMPLOYEES table.Which three subqueries work? ()

    A.SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id);

    B.SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);

    C.SELECT distinct department_id FROM employees WHERE salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);

    D.SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);

    E.SELECT last_name FROM employees WHERE salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);

    F.SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));


    参考答案:C, D, E

  • 第2题:

    Which two statements complete a transaction?()

    • A、DELETE employees;
    • B、DESCRIBE employees;
    • C、ROLLBACK TO SAVEPOINT C;
    • D、GRANT SELECT ON employees TO SCOTT;
    • E、ALTER TABLE employees   SET UNUSED COLUMN sal;
    • F、Select MAX(sal)   FROM employees   WHERE department_id = 20;

    正确答案:C,E

  • 第3题:

    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) DEFAULT 'SA_REP' SAL NUMBER COMM_PCT NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below: JOB_ID: Default value specified for this column definition. SAL: Maximum salary earned for the job ID SA_REP. COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable. Which UPDATE statement meets the requirements?()

    • A、UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = &did WHERE employee_id IN (103,115);
    • B、UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = &did WHERE employee_id IN (103,115) AND job_id = 'SA_REP';
    • C、UPDATE employeesC.UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115);
    • D、UPDATE employeesD.UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115) AND job_id = 'SA_REP';
    • E、UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT OR NULL, department_id = &did WHERE employee_id IN (103,115);

    正确答案:C

  • 第4题:

    Which two statements complete a transaction? ()

    • A、DELETE employees;
    • B、DESCRIBE employees;
    • C、ROLLBACK TO SAVE POINT C;
    • D、GRANT SELECT ON employees TO SCOTH
    • E、ALTER TABLE employees SET UNUSED COLUMN sal;
    • F、Select MAX(sal) FROM employees WHERE department _ id 20;

    正确答案:C,E

  • 第5题:

    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) DEFAULT 'SA_REP' SAL NUMBER COMM_PCT NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below: JOB_ID: Default value specified for this column definition. SAL: Maximum salary earned for the job ID SA_REP. COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable. Which UPDATE statement meets the requirements?()

    • A、UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = &did WHERE employee _id IN (103,115);
    • B、UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = &did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';
    • C、UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115);
    • D、UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';
    • E、UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') comm_pct = DEFAULT OR NULL, department_id = &did WHERE employee_id IN (103,115);

    正确答案:C

  • 第6题:

    单选题
    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view?()
    A

    SELECT a.last_name, a.salary, a.department_id,

    B

    maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary < b.maxsal;

    C

    SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))

    D

    SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);

    E

    SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);


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

  • 第7题:

    多选题
    Examine the data in the EMPLOYEES table: Which three subqueries work? ()
    A

    SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department _ id);

    B

    SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);

    C

    SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);

    D

    SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);

    E

    SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);

    F

    SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));


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

  • 第8题:

    多选题
    Which two statements complete a transaction?()
    A

    DELETE employees;

    B

    DESCRIBE employees;

    C

    ROLLBACK TO SAVE POINT C;

    D

    GRANT SELECT ON employees TO SCOTH

    E

    ALTER TABLE employees SET UNUSED COLUMN sal;

    F

    Select MAX(sal) FROM employees WHERE department _ id 20;


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

  • 第9题:

    单选题
    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) DEFAULT 'SA_REP' SAL NUMBER COMM_PCT NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below: JOB_ID: Default value specified for this column definition. SAL: Maximum salary earned for the job ID SA_REP. COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable. Which UPDATE statement meets the requirements?()
    A

    UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = &did WHERE employee _id IN (103,115);

    B

    UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = &did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';

    C

    UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115);

    D

    UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';

    E

    UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') comm_pct = DEFAULT OR NULL, department_id = &did WHERE employee_id IN (103,115);


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

  • 第10题:

    单选题
    You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20. Which SQL statement would you use to create the view EMP_VU?()
    A

    CREATE VIEW emp_vu AS   SELECT *   FROM employees   WHERE department_id IN (10,20);

    B

    CREATE VIEW emp_vu AS   SELECT *   FROM employees   WHERE department_id IN (10,20)   WITH READ ONLY;

    C

    CREATE VIEW emp_vu AS   SELECT *   FROM employees   WHERE department_id IN (10,20)   WITH CHECK OPTION;

    D

    CREATE FORCE VIEW emp_vu AS   SELECT *   FROM employees   WHERE department_id IN (10,20);

    E

    CREATE FORCE VIEW emp_vu AS   SELECT *   FROM employees   WHERE department_id IN (10,20)   NO UPDATE;


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

  • 第11题:

    单选题
    Exhibit: Examine the data in the EMPLOYEES table. Examine the subquery: SELECT last_name FROM employees WHERE salary IN (SELECT MAX(salary) FROM employees GROUP BY department_id); Which statement is true?()
    A

    The SELECT statement is syntactically accurate.

    B

    The SELECT statement does not work because there is no HAVING clause.

    C

    The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.

    D

    The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.


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

  • 第12题:

    多选题
    Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 30 5000 ... Which three subqueries work? ()
    A

    SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department _ id);

    B

    SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);

    C

    SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);

    D

    SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);

    E

    SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);

    F

    SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));


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

  • 第13题:

    You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20.Which SQL statement would you use to create the view EMP_VU?()

    • A、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);
    • B、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;
    • C、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;
    • D、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);
    • E、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;

    正确答案:C

  • 第14题:

    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view? ()

    • A、SELECT a.last_name, a.salary, a.department_id, b.maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary < b.maxsal;
    • B、SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))
    • C、SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);
    • D、SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);

    正确答案:A

  • 第15题:

    Click the Exhibit button and examine the data in the EMPLOYEES table. Which three subqueries work?()

    • A、SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id);
    • B、SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);
    • C、SELECT distinct department_id FROM employees WHERE salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);
    • D、SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);
    • E、SELECT last_name FROM employees WHERE salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);
    • F、SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));

    正确答案:C,D,E

  • 第16题:

    Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 30 5000 ... Which three subqueries work? ()

    • A、SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department _ id);
    • B、SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);
    • C、SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);
    • D、SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);
    • E、SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);
    • F、SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));

    正确答案:C,D,E

  • 第17题:

    You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20. Which SQL statement would you use to create the view EMP_VU? ()

    • A、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department _ id IN (10,20);
    • B、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;
    • C、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;
    • D、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WITH department_id IN (10,20);
    • E、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;

    正确答案:C

  • 第18题:

    单选题
    Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables: EMPLOYEES EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE NEW_EMPLOYEES EMPLOYEE_ID NUMBER Primary Key NAME VARCHAR2 (60) Which DELETE statement is valid?()
    A

    DELETE FROM employees WHERE employee_id = (SELECT employee_id FROM employees);

    B

    DELETE * FROM employees WHERE employee_id = (SELECT employee_id FROM new_ employees);

    C

    DELETE FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE name = 'carrey');

    D

    DELETE * FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE name = 'carrey');


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

  • 第19题:

    单选题
    Examine the structure of the EMPLOYEES table: Column name Data type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) NOT NULL SAL NUMBER MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You need to create a view called EMP_VU that allows the users to insert rows through the view. Which SQL statement, when used to create the EMP_VU view, allows the users to insert rows?()
    A

    CREATE VIEW emp_vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);

    B

    CREATE VIEW emp_vu AS SELECT employee_id, emp_name, job_id, department_id FROM employees WHERE mgr_id IN (102, 120);

    C

    CREATE VIEW emp_vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_id;

    D

    CREATE VIEW emp_vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;


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

  • 第20题:

    单选题
    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) DEFAULT 'SA_REP' SAL NUMBER COMM_PCT NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below: JOB_ID: Default value specified for this column definition. SAL: Maximum salary earned for the job ID SA_REP. COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable. Which UPDATE statement meets the requirements?()
    A

    UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = &did WHERE employee_id IN (103,115);

    B

    UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = &did WHERE employee_id IN (103,115) AND job_id = 'SA_REP';

    C

    UPDATE employeesC.UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115);

    D

    UPDATE employeesD.UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115) AND job_id = 'SA_REP';

    E

    UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT OR NULL, department_id = &did WHERE employee_id IN (103,115);


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

  • 第21题:

    单选题
    You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20. Which SQL statement would you use to create the view EMP_VU? ()
    A

    CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department _ id IN (10,20);

    B

    CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;

    C

    CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;

    D

    CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WITH department_id IN (10,20);

    E

    CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;


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

  • 第22题:

    多选题
    Click the Exhibit button and examine the data in the EMPLOYEES table. Which three subqueries work?()
    A

    SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id);

    B

    SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);

    C

    SELECT distinct department_id FROM employees WHERE salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);

    D

    SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);

    E

    SELECT last_name FROM employees WHERE salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);

    F

    SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));


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

  • 第23题:

    单选题
    Examine the structure if the EMPLOYEES table: Column name Data Type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) NOT NULL SAL NUMBER MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You need to create a view called EMP_VU that allows the user to insert rows through the view. Which SQL statement, when used to create the EMP_VU view, allows the user to insert rows?()
    A

    CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);

    B

    CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id department_id FROM employees WHERE mgr_id IN (102, 120);

    C

    CREATE VIEW emp_Vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_ id;

    D

    CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;


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