In which four clauses can a sub query be used? (Choose four.)
A.
in the INTO clause of an INSERT statement
B.
in the FROM clause of a SELECT statement
C.
in the GROUP BY clause of a SELECT statement
D.
in the WHERE clause of a SELECT statement
E.
in the SET clause of an UPDATE statement
F.
in the VALUES clause of an INSERT statement
Explanation:
A: a sub query is valid on the INTO clause of an ISERT Statement
B: a sub query can be used in the FROM clause of a SELECT statement
D: a sub query can be used in the WHERE clause of a SELECT statement,
E: a sub query can be used in the SET clauses of an UPDATE statement,
Incorrect answer:
Csub query cannot be used
F: is incorrect.
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 6-5
B,D,E and F should be correct!
Totally agree ! B D E F !
If should be F also. It can be included like this in the values clause in question 108:
INSERT INTO orders
VALUES (1,’10-mar-2007′, ‘direct’,
(SELECT customer_id
FROM customers
WHERE cust_last_name=’Roberts’ AND
credit_limit=600), 1000);
A subquery can be used to select rows for insertion but not in a VALUES clause of an INSERT statement.
OCA Oracle Database 12c SQL Fundamentals I Exam Guide : Chapter 8: Using Subqueries to Solve Problems
Downlaod new Madden 17 Coin Glitch and Generator game!
Best Madden NFL 17 Coin Glitch and Genrator for unlimied Cash and Coins!
DOWNLOAD LINK : Madden NFL 17 Coin Glich And Generator