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.
Correct Answer:
ABD
🗳️
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.)
Correct Answer:
BDE
🗳️
Which statement is true regarding external tables?
Correct Answer:
A
🗳️
References:
https://docs.oracle.com/cd/B28359_01/server.111/b28310/tables013.htm
Which two statements are true about Data Manipulation Language (DML) statements?
Correct Answer:
BE
🗳️
References:
http://www.techonthenet.com/sql/and_or.php
Which two statements are true regarding roles? (Choose two.)
Correct Answer:
BE
🗳️
References:
http://docs.oracle.com/cd/E25054_01/network.1111/e16543/authorization.htm#autoId28
Which two statements are true regarding constraints? (Choose two)
Correct Answer:
CD
🗳️
Evaluate the following statement.
Which statement is true regarding the evaluation of rows returned by the subquery in the INSERT statement?
Correct Answer:
A
🗳️
References:
http://psoug.org/definition/WHEN.htm
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?
Correct Answer:
B
🗳️
You want to display 5 percent of the rows from the SALES table for products with the lowest AMOUNT_SOLD and also want to include the rows that have the same even if this causes the output to exceed 5 percent of the rows.
AMOUNT_SOLD -
Which query will provide the required result?
Correct Answer:
A
🗳️
Examine the structure of the MEMBERS table:
Name Null? Type
------------------ --------------- ------------------------------
MEMBER_ID NOT NULL VARCHAR2 (6)
FIRST_NAME VARCHAR2 (50)
LAST_NAME NOT NULL VARCHAR2 (50)
ADDRESS VARCHAR2 (50)
You execute the SQL statement:
SQL > SELECT member_id, ' ' , first_name, ' ' , last_name "ID FIRSTNAME LASTNAME " FROM members;
What is the outcome?
Correct Answer:
D
🗳️