Question 6

Which statement is true regarding external tables?
  • Question 7

    View the exhibit and examine the structures of the EMPLOYEESand DEPARTMENTStables.
    EMPLOYEES
    Name Null? Type
    - ---------------- ----- -------------
    EMPLOYEE_ID NOT NULL NUMBER(6)
    FIRST_NAME VARCHAR2(20)
    LAST_NAME NOT NULL VARCHAR2(25)
    HIRE_DATE NOT NULL DATE
    JOB_ID NOT NULL VARCHAR2(10)
    SALARY NUMBER(10,2)
    COMMISSION NUMBER(6,2)
    MANAGER_ID NUMBER(6)
    DEPARTMENT_ID NUMBER(4)
    DEPARTMENTS
    Name Null? Type
    ----------------- ----- -------------
    DEPARTMENT_ID NOT NULL NUMBER(4)
    DEPARTMENT_NAME NOT NULL VARCHAR2(30)
    MANAGER_ID NUMBER(6)
    LOCATION_ID NUMBER(4)
    You want to update EMPLOYEEStable as follows:
    Update only those employees who work in Boston or Seattle (locations 2900 and 2700).

    Set department_idfor these employees to the department_idcorresponding to London

    (location_id 2100).
    Set the employees' salary in location_id2100 to 1.1 times the average salary of their department.

    Set the employees' commission in location_id2100 to 1.5 times the average commission of their

    department.
    You issue the following command:
    SQL> UPDATE employees
    SET department_id
    ( SELECT department_id
    FROM departments
    WHERE location_id = 2100),
    ( salary, commission)
    ( SELECT 1.1*AVG(salary), 1.5*AVG(commission)
    FROM employees, departments
    WHERE departments.location_id IN(2900, 2700, 2100))
    WHERE department_id IN
    ( SELECT department_id
    FROM departments
    WHERE location_id = 2900
    OR location_id = 2700;
    What is outcome?
  • Question 8

    View the exhibit and examine the structure of ORDERSand CUSTOMERStables.
    ORDERS
    Name
    Null? Type
    ORDER_ID NOT NULL NUMBER(4)
    ORDER_DATE NOT NULL DATE
    ORDER_MODE VARCHAR2(8)
    CUSTOMER_ID NOT NULL NUMBER(6)
    ORDER_TOTAL NUMBER(8, 2)
    CUSTOMERS
    Name Null? Type
    CUSTOMER_ID NOT NULL NUMBER(6)
    CUST_FIRST_NAME NOT NULL VARCHAR2(20)
    CUST_LAST_NAME NOT NULL VARCHAR2(20)
    CREDIT_LIMIT NUMBER(9,2)
    CUST_ADDRESS VARCHAR2(40)
    Which INSERT statement should be used to add a row into the ORDERStable for the customer whose CUST_LAST_NAMEis Robertsand CREDIT_LIMITis 600? Assume there exists only one row with CUST_LAST_NAME as Roberts and CREDIT_LIMIT as 600.
  • Question 9

    Examine the structure of the EMPLOYEES table.

    You must display the maximum and minimum salaries of employees hired 1 year ago.
    Which two statements would provide the correct output? (Choose two.)
  • Question 10

    You execute this command:

    Which two are true?