Oracle Database 12c SQL Test, Exams of Database Programming

Document for Oracle Database 12c SQL Test

Typology: Exams

2016/2017

Uploaded on 07/10/2017

FIDELE
FIDELE 🇺🇸

1 document

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
http://www.examsboost.com/
ExamsBoost
Boost up Your Certification Score
Up to Date products, reliable and verified.
Questions and Answers in PDF Format.
Oracle
1Z0-071
Oracle Database 12c SQL
Full version is available at http://www.examsboost.com/test/1z0-071/
pf3
pf4
pf5

Partial preview of the text

Download Oracle Database 12c SQL Test and more Exams Database Programming in PDF only on Docsity!

http://www.examsboost.com/

ExamsBoost

Boost up Your Certification Score

 Up to Date products, reliable and verified.

 Questions and Answers in PDF Format.

Oracle

1Z0-

Oracle Database 12c SQL

ExamCode: 1Z0- 071

ExamName: Oracle Database 12c SQL

Vendor Name: Oracle

Edition = DEMO

Question: 1

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; Which ORDER BY clause are valid for the above query? (Choose all that apply.)

A. ORDER BY 2,
B. ORDER BY CUST_NO

C. ORDER BY 2,cust_id D. ORDER BY "CUST_NO" E. ORDER BY "Last Name"

Answer: A, C, E

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.

Question: 2

Which statements are true regarding the WHERE and HAVING clauses in a SELECT statement? (Choose all that apply.)

A. The HAVING clause can be used with aggregate functions in subqueries. B. The WHERE clause can be used to exclude rows after dividing them into groups. C. The WHERE clause can be used to exclude rows before dividing them into groups. D. The aggregate functions and columns used in the HAVING clause must be specified in the SELECT list of the query.

Answer: B,E

Question: 6

Which two statements are true regarding constraints? (Choose two.)

A. A foreign key cannot contain NULL values. B. A column with the UNIQUE constraint can contain NULL. C. A constraint is enforced only for the INSERT operation on a table. D. A constraint can be disabled even if the constraint column contains data. E. All the constraints can be defined at the column level as well as the table level

Answer: B,D

Question: 7

Evaluate the following statement: INSERT ALL WHEN order_total < 10000 THEN INTO small_orders WHEN order_total > 10000 AND order_total < 20000 THEN INTO medium_orders WHEN order_total > 2000000 THEN INTO large_orders SELECT order_id, order_total, customer_id FROM orders; Which statement is true regarding the evaluation of rows returned by the subquery in the INSERT statement?

A. They are evaluated by all the three WHEN clauses regardless of the results of the evaluation of any other WHEN clause. B. They are evaluated by the first WHEN clause. If the condition is true, then the row would be evaluated by the subsequent WHEN clauses. C. They are evaluated by the first WHEN clause. If the condition is false, then the row would be evaluated by the subsequent WHEN clauses. D. The INSERT statement would give an error because the ELSE clause is not present for support in case none of the WHEN clauses are true.

Answer: A

Question: 8

Examine the structure of the members table:

You want to display details of all members who reside in states starting with the letter A followed by exactly one character. Which SQL statement must you execute?

A. SELECT * FROM MEMBERS WHERE state LIKE '%A_* ; B. SELECT * FROM MEMBERS WHERE state LIKE 'A_*; C. SELECT * FROM MEMBERS WHERE state LIKE 'A_%'; D. SELECT * FROM MEMBERS WHERE state LIKE 'A%';

Answer: A