Section 1

Preview this deck

outer

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (50)

Section 1

(50 cards)

outer

Front

The results of a subquery are passed back as input to the ____ query.

Back

single-row

Front

The <> operator is referred to as a(n) ____ operator.

Back

>ALL

Front

Which operator will instruct Oracle11g to list all records with a value that is more than the highest value returned by the subquery?

Back

HAVING

Front

Which clause is used when the group results of a subquery need to be restricted, based on some condition?

Back

correlated subquery

Front

Which of the following terms refers to a type of subquery that is processed, or executed, once for each row in the outer query?

Back

ORDER BY

Front

A subquery, except one in the FROM clause, cannot contain a(n) ____ clause.

Back

ALL and ANY

Front

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?

Back

none of the above

Front

Based on the contents of the BOOKS table, which of the following SQL statements will return an error message?

Back

NVL

Front

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.

Back

parent query

Front

An outer query is also referred to as a(n) ____ query.

Back

line 4

Front

Based upon the contents of the BOOKS table, which line of the following SQL statement contains an error?1 SELECT title, pubid, cost, retail2 FROM books3 WHERE (pubid, cost)4 (SELECT pubid, cost)5 FROM books6 WHERE pubid = 3);

Back

both a and b

Front

A subquery must include a(n) ____ clause.

Back

subquery

Front

A complete query nested inside another query is called a(n) ____.

Back

multiple-column

Front

The following SQL statement contains which type of subquery?SELECT title, retail, category, cataverage FROM books NATURAL JOIN(SELECT category, AVG(retail) cataverage FROM books GROUP BY category);

Back

IS NULL

Front

Which comparison operator allows you to search for NULL values in a subquery?

Back

single-row

Front

The > operator is referred to as a(n) ____ operator.

Back

multiple-row subquery

Front

Which of the following subqueries returns more than one row of results to the outer query?

Back

all of the above

Front

Which of the following can be used in a WHERE clause?

Back

inline view

Front

A temporary table that is created when a multiple-column subquery is used in the FROM clause of an outer query is called a(n) ____.

Back

correlated

Front

The following SQL statement contains which type of subquery?SELECT title FROM books WHERE EXISTS(SELECT isbn FROM orderitems WHERE books.isbn = orderitems.isbn);

Back

single-row

Front

The operators =, <, >, <=, >=, and <> are referred to as ____ operators.

Back

all of the above

Front

Any type of subquery can be used in the ____ clause of a SELECT statement.

Back

( )

Front

Which of the following must be used to separate a subquery from the outer query?

Back

inline view

Front

The following SQL statement contains what type of subquery? SELECT b.title, b.retail, a.category, a.cataverage FROM books b, (SELECT category, AVG(retail) cataverage FROM books GROUP BY category) a WHERE b.category = a.category;

Back

SELECT customer# FROM customers WHERE NVL(referred, 0) =(SELECT NVL(referred,0) FROM customers WHERE customer# = 1003);

Front

Based on the contents of the CUSTOMERS table, which of the following SQL statements will display the customer# of all customers who were referred by the same individual that referred customer# 1003?

Back

When searching for all customers who live in the same state as customer# 1007

Front

Based upon the contents of the CUSTOMERS table, which of the following would be the most appropriate use of a subquery?

Back

line 3

Front

Based on the contents of the BOOKS table, which line in the following SQL statement contains an error?1 SELECT title2 FROM books3 WHERE pubid EXISTS IN4 (SELECT pubid 5 FROM books6 WHERE retail > 41.95);

Back

SELECT customer# FROM customers WHERE state =(SELECT state FROM customers WHERE customer#=1013);

Front

Based on the contents of the CUSTOMERS table, which SQL statement will display the customers residing in the same state as customer#1013?

Back

multiple-row

Front

A(n) ____ subquery is one that can return several rows of results.

Back

single-row

Front

The = operator is referred to as a(n) ____ operator

Back

IN

Front

The ____ operator indicates that the records processed by the outer query must match one of the values returned by the subquery

Back

less than the lowest

Front

The <ALL operator indicates that a value must be ____ value returned by the subquery

Back

none of the above

Front

Based on the contents of the BOOKS table, which line of the following SQL statement contains an error?1 SELECT isbn, title2 FROM books3 WHERE pubid =4 (SELECT pubid5 FROM books6 WHERE title = 'SHORTEST POEMS')7 AND retail-cost >8 (SELECT AVG(retail-cost)9 FROM books);

Back

EXISTS

Front

The ____ operator is used to determine whether a condition is present in a subquery

Back

all of the above

Front

Which of the following operators is used with a multiple-row subquery?

Back

single-row

Front

The following SQL statement contains what type of subqueries?SELECT isbn, title FROM books WHERE pubid =(SELECT pubid FROM books WHERE title = 'SHORTEST POEMS')AND retail-cost >(SELECT AVG(retail-cost) FROM books);

Back

HAVING

Front

If the result returned from a subquery must be compared to a group function, then the inner query must be nested in the outer query's ____ clause.

Back

multiple-row

Front

The following SQL statement contains which type of subquery?SELECT title, retail, category FROM booksWHERE retail IN (SELECT MAX(retail) FROM books GROUP BY category);

Back

MERGE statement

Front

In Oracle11g, a(n) ____ allows a series of DML actions to occur

Back

DML

Front

With a MERGE statement, a series of ____ actions can occur with a single SQL statement.

Back

<ANY

Front

Which operator will instruct Oracle10g to list all records with a value that is less than the highest value returned by the subquery?

Back

=ANY

Front

...

Back

single-row

Front

The following SQL statement contains which type of subquery? SELECT title, retail, (SELECT AVG(retail) FROM books) FROM books;

Back

more than the highest

Front

The >ALL operator indicates that a value must be ____ value returned by the subquery.

Back

single-row

Front

The <= operator is referred to as a(n) ____ operator

Back

IN

Front

When a multiple-column subquery is included in the WHERE or HAVING clause of the outer query, which operator is used by the outer query to evaluate the results of the subquery?

Back

none of the above

Front

The EXISTS operator must be listed ____.

Back

none of the above

Front

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?

Back

subquery

Front

The outer query receives its input from the ____.

Back

uncorrelated

Front

The following SQL statement contains which type of subquery?SELECT title, retail, category, cataverage FROM books NATURAL JOIN(SELECT category, AVG(retail) cataverage FROM books GROUP BY category);

Back