314_Ch12_SubQueriesMERGE
A multiple-column subquery nested in the SELECT clause of the outer query is known as an inline view.
False
IN is not a valid operator for a multiple-column subquery.
False
The EXISTED operator is used to determine whether a condition is present in a subquery.
False
A(n) ____________________ query can return several rows of results, but only one column.
Multiple-Row
Based on the contents of the BOOKS table, which line of the following SQL statement contains an error? 1 SELECT isbn, title 2 FROM books 3 WHERE pubid = 4 (SELECT pubid 5 FROM books 6 WHERE title = 'SHORTEST POEMS') 7 AND retail-cost > 8 (SELECT AVG(retail-cost) 9 FROM books);
None of the above
Based on the contents of the BOOKS table, which of the following SQL statements will display the title of all books published by the publisher of SHORTEST POEMS?
None of the above
An outer query is also referred to as a(n) ____ query.
Parent query
A single-row subquery can be nested in the SELECT clause of the outer function.
True
A subquery is a complete query nested inside another query.
True
A subquery is required when the condition for the outer query is based upon an unknown.
True
A subquery nested in a SELECT clause cannot contain an ORDER BY clause.
True
IN is a valid multiple-row subquery operator.
True
If a subquery is nested in a HAVING clause, the subquery must be on the right side of the comparison operator.
True
The IN operator can be used with single-row, multiple-row, or multiple-column subqueries.
True
The IN operator is valid for multiple-row subqueries.
True
The NVL function can be used in a subquery.
True
When a multiple-column subquery is included in the outer query's WHERE clause, the column names listed in the WHERE clause must be in the same order as they're listed in the subquery's SELECT clause.
True
When used with a multiple-row subquery, the IN operator indicates that the records processed by the outer query must match one of the values returned by the subquery.
True
A(n) ____________________ subquery returns more than one column to the outer query.
multiple column
Which of the following subqueries returns more than one row of results to the outer query?
multiple-row subquery
Based on the contents of the BOOKS table, which line of the following SQL statement contains an error? 1 SELECT isbn, title 2 FROM books 3 WHERE pubid = 4 (SELECT pubid 5 FROM books 6 WHERE title = 'SHORTEST POEMS') 7 AND retail-cost > 8 (SELECT AVG(retail-cost) 9 FROM books);
none of the above
The EXISTS operator must be listed ____.
none of the above
The results of a subquery are passed back to the ____________________ query.
outer
A(n) ____________________ subquery can return only one row of results to the outer query.
single-row
The <> operator is referred to as a(n) ____ operator.
single-row
A(n) ____________________ is a nested query - one complete query inside another query.
subquery
Which of the following must be used to separate a subquery from the outer query?
( )
Which of the following operators is the equivalent of the IN comparison operator?
=ANY
Which operators can be combined with other comparison operators to treat the results of a subquery as a set of values, rather than as individual values?
ALL and ANY
Any type of subquery can be used in the ____ clause of a SELECT statement.
All of the above
Which comparison operator allows you to search for NULL values in a subquery?
IS NULL
Based on the contents of the BOOKS table, which line in the following SQL statement contains an error? 1 SELECT title 2 FROM books 3 WHERE pubid EXISTS IN 4 (SELECT pubid 5 FROM books 6 WHERE retail > 41.95);
Line 3
Based upon the contents of the BOOKS table, which line of the following SQL statement contains an error? 1 SELECT title, pubid, cost, retail 2 FROM books 3 WHERE (pubid, cost) 4 (SELECT pubid, cost) 5 FROM books 6 WHERE pubid = 3);
Line 4
A(n) ____ subquery is one that can return several rows of results.
Multiple-Row
If it is possible for a subquery to return a NULL value to the outer query for comparison, the ____ function should be used to substitute an actual value for the NULL.
NVL
A subquery, except one in the FROM clause, cannot contain a(n) ____ clause.
ORDER BY
If the value of the EXISTS operator is ____________________, then the rows meeting the condition are displayed.
TRUE
A subquery must include a(n) ____ clause.
both a and b
The ____ operator indicates that the records processed by the outer query must match one of the values returned by the subquery.
IN
Valid multiple-row operators include ANY, ALL, and ____________________.
IN
Based on the contents of the CUSTOMERS table, which SQL statement will display the customers residing in the same state as customer#1013?
SELECT customer# FROM customers WHERE state = (SELECT state FROM customers WHERE customer#=1013);
The > operator is referred to as a(n) ____ operator.
Single-row
The outer query receives its input from the ____.
Subquery