A(n) ____ query can be used to produce a relation that retains duplicate rows.
UNION
UNION ALL
INTERSECT
MINUS
A ____ is a query inside a query.
subquery
basequery
join
set query
INSERT INTO PRODUCT SELECT * FROM P; is an example of a ____.
join
subquery
set operator
stored procedure
A(n) ____ is a block of code (containing standard SQL statements and procedural extensions) that is stored and executed at the DBMS server.
persistent stored module
permanent SQL module
SQL statement
program manipulation command
A(n) ____ join returns not only the rows matching the join condition but also the rows with unmatched values.
outer
inner
equi-
cross
A(n) ____ join will select only the rows with common values in the common column(s), excluding rows with unmatched values and duplicate columns.
natural
cross
full
outer
The ____ pseudo column is used to select the next available value from a sequence.
CURRVAL
NEXTVAL
NEXT
GET_NEXT
What type of inner join requires the use of a table qualifier?
USING
NATURAL
EQUI-
JOIN ON
In addition to a WHERE clause, a subquery can be used with a(n) ____ clause.
ON
HAVING
GROUP BY
MINUS
A subquery that executes once for each row in the outer query is a(n) ____ subquery.
nested
correlated
inline
grouped
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
What type of subquery could be used in place of INTERSECT if the RDBMS does not support it?
IN
OF
AND
UNION
The ____ function returns the current system date in MS Access/SQLServer.
TO_DATE()
SYSDATE()
DATE()
TODAY()
Complete the following inner join: SELECT * FROM T1 JOIN T2 ____ (C1)
OF
USING
HAS
JOIN ON
Which operator(s) is/are used with subqueries that use inequality operators on a list of values?
IN
ANY and ALL
ON
ONLY
The Oracle ____ function returns the current date.
DATE
SYSDATE
CURRENT_DATE
TO_DATE
What type of subquery could be used in place of MINUS if the RDBMS does not support it?
IN
NOT IN
AND
UNION
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
Assume you are using the UNION ALL statement to combine the results from two identical tables CUSTOMER and CUSTOMER_2. The CUSTOMER table contains 10 rows, while the CUSTOMER_2 table contains seven rows. There are two customers included in both tables. How many records are returned when using the UNION ALL statement?
7
10
15
17
Assume you are using the UNION statement to combine the results from two identical tables CUSTOMER and CUSTOMER_2. The CUSTOMER table contains 10 rows, while the CUSTOMER_2 table contains seven rows. There are two customers included in both tables. How many records are returned when using the UNION statement?