Chapter 8 Flashcards
____ is a relational set operator.
-MINUS
PLUS
ALL
EXISTS
The ____ query combines rows from two queries and excludes duplicates.
-UNION
UNION ALL
INTERSECT
MINUS
The syntax for the UNION query is ____.
query + query
UNION (query, query)
UNION: query query
-query UNION query
Assume you are using the UNION operator to combine the results from two tables with identical structure, CUSTOMER and CUSTOMER_2. The CUSTOMER table contains 10 rows, while the CUSTOMER_2 table contains 7 rows. Customers Dunne and Olowski are included in the CUSTOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the UNION operator?
7
10
-15
17
Assume you are using the UNION ALL operator to combine the results from two tables with identical structure, CUSTOMER and CUSTOMER_2. The CUSTOMER table contains 10 rows, while the CUSTOMER_2 table contains 7 rows. Customers Dunne and Olowski are included in the CUSTOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the UNION ALL operator?
7
10
15
-17
The PL/SQL block starts with the ____ clause.
IS
OPEN
DECLARE
-BEGIN
A stored function uses the ____ statement to return a value.
EXIT
END
-RETURN
PROCESS
UNION, INTERSECT, and MINUS work properly only if relations are union-compatible, which means that the names of the relation attributes and their data types must be different.
false
SQL supports the conditional execution of procedures (if…then…else statements) that are typically supported by a programming language.
false
Procedural code is executed on the database client machine.
false
The following SQL statement uses a(n) ____.
SELECT P_CODE, P_DESCRIPT, P_PRICE, V_NAME
FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE = VENDOR.V_CODE;
set operator
natural join
-“old-style” join
procedural statement
When using a(n) ____ join, only rows that meet the given criteria are returned.
full
-inner
outer
set
How many rows would be returned from a cross join of tables A and B, if A contains 8 rows and B contains 18?
8
18
26
-144
A(n) ____ join will select only the rows with matching values in the common attribute(s).
-natural
cross
full
outer
If you wish to create an inner join, but the two tables do not have a commonly named attribute, you can use a(n) ____ clause.
OF
USING
HAS
-JOIN ON