



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Document for Oracle Database 12c SQL Test
Typology: Exams
1 / 6
This page cannot be seen from the preview
Don't miss anything!




ExamCode: 1Z0- 071
ExamName: Oracle Database 12c SQL
Vendor Name: Oracle
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.)
C. ORDER BY 2,cust_id D. ORDER BY "CUST_NO" E. ORDER BY "Last Name"
Explanation: Using the ORDER BY Clause in Set Operations
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.
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
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.
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%';