Oracle 1Z0-071 Exam (page: 5)
Oracle Database SQL
Updated on: 31-Aug-2025

Viewing Page 5 of 77

The BOOKS_TRANSACTIONS table exists in your database.
SQL>SELECT * FROM books_transactions ORDER BY 3;

What is the outcome on execution?

  1. The execution fails unless the numeral 3 in the ORDER BY clause is replaced by a column name.
  2. Rows are displayed in the order that they are stored in the table only for the three rows with the lowest values in the key column.
  3. Rows are displayed in the order that they are stored in the table only for the first three rows.
  4. Rows are displayed sorted in ascending order of the values in the third column in the table.

Answer(s): D



Examine the command:


What does ON DELETE CASCADE imply?

  1. When the BOOKS table is dropped, the BOOK_TRANSACTIONS table is dropped.
  2. When the BOOKS table is dropped, all the rows in the BOOK_TRANSACTIONS table are deleted but the table structure is retained.
  3. When a row in the BOOKS table is deleted, the rows in the BOOK_TRANSACTIONS table whose BOOK_ID matches that of the deleted row in the BOOKS table are also deleted.
  4. When a value in the BOOKS.BOOK_ID column is deleted, the corresponding value is updated in the
    BOOKS_TRANSACTIONS.BOOK_ID column.

Answer(s): C



View the exhibit and examine the structure of the EMPLOYEES table.


You want to display all employees and their managers having 100 as the MANAGER_ID. You want the output in two columns: the first column would have the LAST_NAME of the managers and the second column would have LAST_NAME of the employees.

Which SQL statement would you execute?

  1. SELECT m.last_name "Manager", e.last_name "Employee"
    FROM employees m JOIN employees e
    ON m.employee_id = e.manager_id
    WHERE m.manager_id = 100;
  2. SELECT m.last_name "Manager", e.last_name "Employee"
    FROM employees m JOIN employees e
    ON m.employee_id = e.manager_id
    WHERE e.manager_id = 100;
  3. SELECT m.last_name "Manager", e.last_name "Employee"
    FROM employees m JOIN employees e
    ON e.employee_id = m.manager_id
    WHERE m.manager_id = 100;
  4. SELECT m.last_name "Manager", e.last_name "Employee"
    FROM employees m JOIN employees e
    WHERE m.employee_id = e.manager_id AND e.manager_id = 100

Answer(s): B



Which three statements are true about multiple-row subqueries?

  1. They can contain a subquery within a subquery.
  2. They can return multiple columns as well as rows.
  3. They cannot contain a subquery within a subquery.
  4. They can return only one column but multiple rows.
  5. They can contain group functions and GROUP BY and HAVING clauses.
  6. They can contain group functions and the GROUP BY clause, but not the HAVING clause.

Answer(s): A,B,E



Examine the structure of the EMPLOYEES table.


There is a parent/child relationship between EMPLOYEE_ID and MANAGER_ID.
You want to display the last names and manager IDs of employees who work for the same manager as the employee whose EMPLOYEE_ID is 123.

Which query provides the correct output?

  1. SELECT e.last_name, m.manager_id
    FROM employees e RIGHT OUTER JOIN employees m
    on (e.manager_id = m.employee_id)
    AND e.employee_id = 123;
  2. SELECT e.last_name, m.manager_id
    FROM employees e LEFT OUTER JOIN employees m
    on (e.employee_id = m.manager_id)
    WHERE e.employee_id = 123;
  3. SELECT e.last_name, e.manager_id
    FROM employees e RIGHT OUTER JOIN employees m
    on (e.employee_id = m.employee_id)
    WHERE e.employee_id = 123;
  4. SELECT m.last_name, e.manager_id
    FROM employees e LEFT OUTER JOIN employees m
    on (e.manager_id = m.manager_id)
    WHERE e.employee_id = 123;

Answer(s): D



Viewing Page 5 of 77



Share your comments for Oracle 1Z0-071 exam with other users:

Saravana Kumar TS 12/8/2023 9:49:00 AM

question: 93 which statement is true regarding the result? sales contain 6 columns and values contain 7 columns so c is not right answer.
INDIA