Free Oracle 1Z0-071 Exam Braindumps (page: 2)

Evaluate the following SQL statement:

SQL> select cust_id, cust_last_name "Last name"
FROM customers
WHERE country_id = 10
UNION
SELECT cust_id CUST_NO, cust_last_name
FROM customers
WHERE country_id = 30

Identify three ORDER BY clauses either one of which can complete the query.

  1. ORDER BY "Last name"
  2. ORDER BY 2, cust_id
  3. ORDER BY CUST_NO
  4. ORDER BY 2, 1
  5. ORDER BY "CUST_NO"

Answer(s): A,B,D

Explanation:

Using the ORDER BY Clause in Set Operations
-The ORDER BY clause can appear only once at the end of the compound query.
-Component queries cannot have individual ORDER BY clauses.
-The ORDER BY clause recognizes only the columns of the first SELECT query.
-By default, the first column of the first SELECT query is used to sort the output in an ascending order.



Which three statements are true regarding the WHERE and HAVING clauses in a SQL statement? (Choose three.)

  1. WHERE and HAVING clauses cannot be used together in a SQL statement.
  2. The HAVING clause conditions can have aggregate functions.
  3. The HAVING clause conditions can use aliases for the columns.
  4. The WHERE clause is used to exclude rows before the grouping of data.
  5. The HAVING clause is used to exclude one or more aggregated results after grouping data.

Answer(s): B,D,E



Which statement is true regarding external tables?

  1. The CREATE TABLE AS SELECT statement can be used to upload data into a normal table in the database from an external table.
  2. The data and metadata for an external table are stored outside the database.
  3. The default REJECT LIMIT for external tables is UNLIMITED.
  4. ORACLE_LOADER and ORACLE_DATAPUMP have exactly the same functionality when used with an external table.

Answer(s): A


Reference:

https://docs.oracle.com/cd/B28359_01/server.111/b28310/tables013.htm



Which two statements are true about Data Manipulation Language (DML) statements?

  1. An INSERT INTO...VALUES.. statement can add multiple rows per execution to a table.
  2. An UPDATE... SET... statement can modify multiple rows based on multiple conditions on a table.
  3. A DELETE FROM..... statement can remove rows based on only a single condition on a table.
  4. An INSERT INTO... VALUES..... statement can add a single row based on multiple conditions on a table.
  5. A DELETE FROM..... statement can remove multiple rows based on multiple conditions on a table.
  6. An UPDATE....SET.... statement can modify multiple rows based on only a single condition on a table.

Answer(s): B,E


Reference:

http://www.techonthenet.com/sql/and_or.php






Post your Comments and Discuss Oracle 1Z0-071 exam prep with other Community members:

1Z0-071 Exam Discussions & Posts