1z0-071 Exam Question 56

View the Exhibit and examine the data in EMP and DEPT tables.

In the DEPT table, DEPTNO is the PRIMARY KEY.
In the EMP table, EMPNO is the PRIMARY KEY and DEPTNO is the FOREIGN KEY referencing the DEPTNO column in the DEPT table.
What would be the outcome of the following statements executed in the given sequence?
DROP TABLE emp;
FLASHBACK TABLE emp TO BEFORE DROP;
INSERT INTO emp VALUES (2, 'SCOTT', 10);
INSERT INTO emp VALUES (3, 'KING', 55);
  • 1z0-071 Exam Question 57

    The PRODUCTStable has the following structure.

    Evaluate the following two SQL statements:
    SQL>SELECT prod_id, NVL2 (prod_expiry_date, prod_expiry_date + 15, ' ') FROM products; SQL>SELECT prod_id, NVL (prod_expiry_date, prod_expiry_date + 15) FROM products; Which statement is true regarding the outcome?
  • 1z0-071 Exam Question 58

    View the exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTSand TIMEStables.

    The PROD_IDcolumn is the foreign key in the SALEStables, which references the PRODUCTStable.
    Similarly, the CUST_IDand TIME_IDcolumns are also foreign keys in the SALEStable referencing the CUSTOMERSand TIMEStables, respectively.
    Evaluate the following CREATE TABLEcommand:
    CREATE TABLE new_sales (prod_id, cust_id, order_date DEFAULT SYSDATE)
    AS
    SELECT prod_id, cust_id, time_id
    FROM sales;
    Which statement is true regarding the above command?
  • 1z0-071 Exam Question 59

    Examine the structure of the ORDERS table: (Choose the best answer.)

    You want to find the total value of all the orders for each year and issue this command:
    SQL> SELECT TO_CHAR(order_date,'rr'), SUM(order_total) FROM orders
    GROUP BY TO_CHAR(order_date, 'yyyy');
    Which statement is true regarding the result?
  • 1z0-071 Exam Question 60

    Which two are true about dropping columns from a table?