Oracle 1Z0-071 Exam (page: 11)
Oracle Database SQL
Updated on: 01-Sep-2025

Viewing Page 11 of 77

View the exhibit for the structure of the STUDENT and FACULTY tables.


You need to display the faculty name followed by the number of students handled by the faculty at the base location.
Examine the following two SQL statements:

Statement 1

SQL>SELECT faculty_name, COUNT(student_id)
FROM student JOIN faculty
USING (faculty_id, location_id)
GROUP BY faculty_name;

Statement 2

SQL>SELECT faculty_name, COUNT(student_id)
FROM student NATURAL JOIN faculty
GROUP BY faculty_name;

Which statement is true regarding the outcome?

  1. Only statement 2 executes successfully and gives the required result.
  2. Only statement 1 executes successfully and gives the required result.
  3. Both statements 1 and 2 execute successfully and give different results.
  4. Both statements 1 and 2 execute successfully and give the same required result.

Answer(s): B



Which statement correctly grants a system privilege?

  1. GRANT CREATE VIEW
    ON table1 TO
    user1;
  2. GRANT ALTER TABLE
    TO PUBLIC;
  3. GRANT CREATE TABLE
    TO user1, user2;
  4. GRANT CREATE SESSION
    TO ALL;

Answer(s): C



View the exhibit and examine the structure of ORDERS and CUSTOMERS tables.


Which INSERT statement should be used to add a row into the ORDERS table for the customer whose CUST_LAST_NAME is Roberts and CREDIT_LIMIT is 600? Assume there exists only one row with CUST_LAST_NAME as Roberts and CREDIT_LIMIT as 600.

  1. Option A
  2. Option B
  3. Option C
  4. Option D

Answer(s): C



Which three statements are correct regarding indexes? (Choose three.)

  1. A non-deferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically attempts to create a unique index.
  2. Indexes should be created on columns that are frequently referenced as part of any expression.
  3. When a table is dropped, corresponding indexes are automatically dropped.
  4. For each DML operation performed on a table, the corresponding indexes are automatically updated if required.

Answer(s): A,C,D


Reference:

http://viralpatel.net/blogs/understanding-primary-keypk-constraint-in-oracle/



View the exhibit and examine the description of the DEPARTMENTS and EMPLOYEES tables.


You wrote this SQL statement to retrieve EMPLOYEE_ID, FIRST_NAME, and DEPARTMENT NAME, for all employees:

SELECT employee_id, first_name, department_name
FROM employees
NATURAL JOIN departments;

The desired output is not obtained after executing the above SQL statement. What could be the reason for this?

  1. The table prefix is missing for the column names in the SELECT clause.
  2. The NATURAL JOIN clause is missing the USING clause.
  3. The DEPARTMENTS table is not used before the EMPLOYEES table in the FROM clause.
  4. The EMPLOYEES and DEPARTMENTS tables have more than one column with the same column name and data type.

Answer(s): D

Explanation:

Natural join needs only one column to be the same in each table. The EMPLOYEES and DEPARTMENTS tables have two columns that are the same (Department_ID and Manager_ID)



Viewing Page 11 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