多选题Examine the data from the EMP table: EMP_ID DEPT_ID COMMISSION 1 10 500 2 20 1000 3 10 4 10 600 5 30 800 6 30 200 7 10 8 20 300 The COMMISSION column shows the monthly commission earned by the employee. Which three tasks would require subqueries or joi

题目
多选题
Examine the data from the EMP table: EMP_ID DEPT_ID COMMISSION 1 10 500 2 20 1000 3 10 4 10 600 5 30 800 6 30 200 7 10 8 20 300 The COMMISSION column shows the monthly commission earned by the employee. Which three tasks would require subqueries or joins in order to perform in a single step? ()
A

Deleting the records of employees who do not earn commission.

B

Increasing the commission of employee 3 by the average commission earned in department 20.

C

Finding the number of employees who do NOT earn commission and are working for department 20.

D

Inserting into the table a new employee 10 who works for department 20 and earns a commission that is equal to the commission earned by employee 3.

E

Creating a table called COMMISSION that has the same structure and data as the columns EMP_ID and COMMISSIONS of the EMP table.

F

Decreasing the commission by 150 for the employees who are working in department 30 and earning a commission of more then 800.


相似考题
更多“Examine the data from the EMP table: EMP_ID DEPT_ID COMMISSI”相关问题
  • 第1题:

    Examine the contents of SQL loader control file:Which three statements are true regarding the SQL* Loader operation performed using the control file?()

    A. An EMP table is created if a table does not exist. Otherwise, if the EMP table is appended with the loaded data.

    B. The SQL* Loader data file myfile1.dat has the column names for the EMP table.

    C. The SQL* Loader operation fails because no record terminators are specified.

    D. Field names should be the first line in the both the SQL* Loader data files.

    E. The SQL* Loader operation assumes that the file must be a stream record format file with the normal carriage return string as the record terminator.


    参考答案:A, B, E

  • 第2题:

    Click the Exhibit button to examine the data of the EMPLOYEES table. Evaluate this SQL statement:SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager"FROM employees e JOIN employees m ON (e.mgr_id = m.employee_id)AND e.salary > 4000;What is its output?()

    A.A

    B.B

    C.C

    D.D

    E.E


    参考答案:A

  • 第3题:

    Select emp_id,emp_name,sex,title,wage from employee order by emp_name句子得到的结果集是按()排序。

    • A、emp_id
    • B、emp_name
    • C、sex
    • D、wage

    正确答案:B

  • 第4题:

    Examine the contents of SQL loader control file: Which three statements are true regarding the SQL* Loader operation performed using the control file?()

    • A、An EMP table is created if a table does not exist. Otherwise, if the EMP table is appended with the loaded data.
    • B、The SQL* Loader data file myfile1.dat has the column names for the EMP table.
    • C、The SQL* Loader operation fails because no record terminators are specified.
    • D、Field names should be the first line in the both the SQL* Loader data files.
    • E、The SQL* Loader operation assumes that the file must be a stream record format file with the normal carriage return string as the record terminator.

    正确答案:A,B,E

  • 第5题:

    多选题
    Examine the data from the EMP table: EMP_ID DEPT_ID COMMISSION 1 10 500 2 20 1000 3 10 4 10 600 5 30 800 6 30 200 7 10 8 20 300 The COMMISSION column shows the monthly commission earned by the employee. Which three tasks would require subqueries or joins in order to perform in a single step? ()
    A

    Deleting the records of employees who do not earn commission.

    B

    Increasing the commission of employee 3 by the average commission earned in department 20.

    C

    Finding the number of employees who do NOT earn commission and are working for department 20.

    D

    Inserting into the table a new employee 10 who works for department 20 and earns a commission that is equal to the commission earned by employee 3.

    E

    Creating a table called COMMISSION that has the same structure and data as the columns EMP_ID and COMMISSIONS of the EMP table.

    F

    Decreasing the commission by 150 for the employees who are working in department 30 and earning a commission of more then 800.


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

  • 第6题:

    单选题
    View the Exhibit and examine the structure of the EMP table. You executed the following command to add a primary key to the EMP table:   ALTER TABLE emp   ADD CONSTRAINT emp_id_pk  PRIMARY KEY (emp_id)   USING INDEX emp_id_idx;   Which statement is true regarding the effect of the command?()
    A

     The PRIMARY KEY is created along with a new index.

    B

     The PRIMARY KEY is created and it would use an existing unique index.

    C

     The PRIMARY KEY would be created in a disabled state because it is using an existing index.

    D

     The statement produces an error because the USING clause is permitted only in the CREATE TABLE command.


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

  • 第7题:

    单选题
    Evaluate the SQL statement: SELECT LPAD(salary,10,*) FROM EMP WHERE EMP_ID = 1001; If the employee with the EMP_ID 1001 has a salary of 17000, what is displayed?()
    A

    17000.00

    B

    17000*****

    C

    ****170.00

    D

    **17000.00

    E

    an error statement


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

  • 第8题:

    单选题
    Examine the following commands executed in your database: SQL> ALTER SESSION RECYCLEBIN=ON; Session altered  SQL > CREATE TABLE emp TABLESPACE tbsfd AS SELECT * FROM hr.employees;  Table created.  Further, you executed the following command to drop the table:  SQL> DROP TABLE emp;Table dropped.  What happens in this scenario?()
    A

    The table is moved to the SYSAUX tablespace.

    B

    The table is moved to the SYSTEM tablespace.

    C

    The table is removed from the database permanently.

    D

    The table is renamed and remains in the TBSFD tablespace.


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

  • 第9题:

    多选题
    User SCOTT wants to perform a bulk insert operation in the EMP_DEP table. SCOTT receives the followingerror after the INSERT statement is issued and few rows are inserted:INSERT INTO EMP_DEP (emp_id,name,salary,dep_name,mgr_id) *ERROR at line 1: ORA-01653: unable to extend table SCOTT.EMP_DEP by 128 in tablespace USERS Identify two actions eitherof which will help you resolve this problem. ()
    A

    Grant the RESOURCE role to SCOTT.

    B

    Add data files to the USERS tablespace.

    C

    Grant the CREATE ANY TABLE privilege to SCOTT.

    D

    Increase the space for SCOTT on the USERS tablespace.

    E

    Increase the size of the data file associated with the USERS tablespace


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

  • 第10题:

    单选题
    The user SCOTT executes the following command successfully to increase the salary values in one of his sessions:  SQL> UPDATE emp SET sal=sal*1.15 WHERE deptno=20;  Before SCOTT ends the transaction, user HR who has the privileges on EMP table executes a query to fetch the salary details but finds the old salary values instead of the increased values.  Why does HR still see the old data?()
    A

    because of redo data from redo log file

    B

    because of data from database buffer cache

    C

    because of data from a temporary tablespace

    D

    because of undo data from the undo tablespace


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

  • 第11题:

    多选题
    User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, orany data definition language (DDL) command: SQL> SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno; SCOTT has opened another session to work with the database instance.  Which three operations would waitwhen issued in SCOTT’s second session()
    A

    LOCK TABLE emp IN SHARE MODE;

    B

    LOCK TABLE emp IN EXCLUSIVE MODE;

    C

    UPDATE emp SET sal=sal*1.2 WHERE job=ANAGER?UPDATE emp SET sal=sal*1.2 WHERE job=?ANAGER?

    D

    INSERT INTO emp(empno,ename) VALUES (1289,’Harry’);

    E

    SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno


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

  • 第12题:

    单选题
    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;


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

  • 第13题:

    Select emp_id,emp_name,sex,title,wage from employee order by emp_name句子得到的结果集是按()排序。

    A.emp_id

    B.emp_name

    C.sex

    D.wage


    本题答案:B

  • 第14题:

    Click the Exhibit button to examine the data of the EMPLOYEES table.Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee‘s manager, for all the employees who have a manager and earn more than 4000?()

    A.SELECT employee_id "Emp_id", emp_name "Employee", salary, employee_id "Mgr_id", emp_name "Manager" FROM employees WHERE salary > 4000;

    B.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager" FROM employees e JOIN employees m WHERE e.mgr_id = m.mgr_id AND e.salary > 4000;

    C.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager" FROM employees e JOIN employees m ON (e.mgr_id = m.employee_id) AND e.salary > 4000;

    D.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.mgr_id "Mgr_id", m.emp_name "Manager" FROM employees e SELF JOIN employees m WHERE e.mgr_id = m.employee_id AND e.salary > 4000;

    E.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.mgr_id "Mgr_id" m.emp_name "Manager" FROM employees e JOIN employees m USING (e.employee_id = m.employee_id) AND e.salary > 4000;


    参考答案:C

  • 第15题:

    Evaluate the SQL statement: SELECT LPAD(salary,10,*) FROM EMP WHERE EMP_ID = 1001; If the employee with the EMP_ID 1001 has a salary of 17000, what is displayed?()

    • A、17000.00
    • B、17000*****
    • C、****170.00
    • D、**17000.00
    • E、an error statement

    正确答案:E

  • 第16题:

    Examine the following commands executed in your database: SQL> ALTER SESSION RECYCLEBIN=ON; Session altered  SQL > CREATE TABLE emp TABLESPACE tbsfd AS SELECT * FROM hr.employees;  Table created.  Further, you executed the following command to drop the table:  SQL> DROP TABLE emp;Table dropped.  What happens in this scenario?()

    • A、The table is moved to the SYSAUX tablespace.
    • B、The table is moved to the SYSTEM tablespace.
    • C、The table is removed from the database permanently.
    • D、The table is renamed and remains in the TBSFD tablespace.

    正确答案:D

  • 第17题:

    单选题
    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 VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only if the minimum salary is less than 5000 and maximum salary is more than 15000?()
    A

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000;

    B

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;

    C

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;

    D

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;

    E

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;


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

  • 第18题:

    单选题
    Evaluate the SQL statement: SELECT LPAD(salary,10,*) FROM EMP WHERE EMP_ID = 1001; If the employee with the EMP_ID 1001 has a salary of 17000, what is displayed?()
    A

    17000.00

    B

    17000*****

    C

    ****170.00

    D

    **17000.00

    E

    an error statement


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

  • 第19题:

    单选题
    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';


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

  • 第20题:

    单选题
    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.


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

  • 第21题:

    多选题
    User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK,or any data definition language (DDL) command:  SQL> SELECT job FROM emp  2  WHERE job=’CLERK’ FOR UPDATE OF empno;  SCOTT has opened another session to work with the database. Which three operations would wait when issued in SCOTT’s second session?()
    A

    LOCK TABLE emp IN SHARE MODE;

    B

    LOCK TABLE emp IN EXCLUSIVE MODE;

    C

    DELETE FROM emp WHERE job=’MANAGER’;

    D

    INSERT INTO emp(empno,ename) VALUES (1289,’Dick’);

    E

    SELECT job FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno;


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

  • 第22题:

    多选题
    User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, or any data definition language (DDL) command: SQL> SELECT ename FROM emp  2 WHERE job=’CLERK’ FOR UPDATE OF empno;  SCOTT has opened another session to work with the database instance.  Which three operations wouldwait when issued in SCOTT’s second session()
    A

    LOCK TABLE emp IN SHARE MODE;

    B

    LOCK TABLE emp IN EXCLUSIVE MODE;

    C

    UPDATE emp SET sal=sal*1.2 WHERE job=MANAGER;

    D

    INSERT INTO emp(empno,ename) VALUES (1289,’Harry’);

    E

    SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno;


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

  • 第23题:

    单选题
    Examine the data of the EMPLOYEES table. EMPLOYEES (EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID) 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 HR_MGR 5000 106 Bryan 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 Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee's manager, for all the employees who have a manager and earn more than 4000?()
    A

    SELECT employee_id Emp_id, emp_name Employee, salary, employee_id Mgr_id, emp_name Manager FROM employees WHERE salary > 4000;

    B

    SELECT e.employee_id Emp_id, e.emp_name Employee,

    C

    salary,

    D

    employee_id Mgr_id, m.emp_name Manager FROM employees e, employees m WHERE e.mgr_id = m.mgr_id AND e.salary > 4000;


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

  • 第24题:

    单选题
    EXHIBIT, Emp Table Exhibit A Exhibit B Examine the data from the EMP table. Evaluate this SQL statement: SELECT * FROM emp WHERE emp _ id = 3); WHERE commission = (SELECT commission FROM emp What is the result when the query is executed?()
    A

    Exhibit A

    B

    Exhibit B 

    C

    The query returns no rows 

    D

    The query fails because the outer query is retrieving more than one column

    E

    The query fails because both the inner and outer queries are retrieving data from the same table.


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