Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Multiple Choices questions: 1. ________ is a relational set operator. a. FROM b.

ID: 3905519 • Letter: M

Question

Multiple Choices questions:

1. ________ is a relational set operator.

    a. FROM  

   b. HAVING  

   c. EXCEPT  

   d. CROSS  

2. In an SQL statement, the ________ specifies the table from which the data will be drawn.

    a. IN clause  

   b. WHERE clause  

   c. FROM clause  

   d. ANY clause

9. A(n) ________ query can be used to produce a relation that retains duplicate rows.

    a. UNION statement  

   b. UNION ALL statement  

   c. INTERSECT statement  

   d. EXCEPT statement  

10. The ________ statement can be used to combine rows from two queries, returning only the rows that appear in both sets.

    a. UNION statement  

   b. UNION ALL statement  

   c. INTERSECT statement  

   d. EXCEPT statement  

11. The ________ in SQL combines rows from two queries and returns only the rows that appear in the first set but not in the second.

    a. UNION statement  

   b. UNION ALL statement  

   c. INTERSECT statement  

   d. EXCEPT statement  

12. Which of the following subqueries can be used in place of INTERSECT if the RDBMS does not support it?

    a. IN subquery  

   b. HAVING subquery  

   c. ANY subquery  

   d. WHERE subquery  

13. Which of the following subqueries can be used in place of MINUS if the RDBMS does not support it?

    a. FROM subquery  

   b. NOT IN subquery  

   c. ALL subquery  

   d. HAVING subquery  

14. 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;

    a. Set operator  

   b. Natural join  

   c. Old-style join  

   d. Procedural statement

15. The ________ is the traditional join in which only rows that meet a given criteria are selected.

    a. full join  

   b. inner join  

   c. outer join  

   d. set join  

16. The statement SELECT * FROM T1, T2 produces a(n) ________.

    a. cross join  

   b. natural join  

   c. old-style join  

   d. full join  

17. A ________ of two tables returns rows with matching values and includes all rows from both tables with unmatched values.

    a. natural join  

   b. cross join  

   c. full outer join  

   d. left outer join

Explanation / Answer

1. EXCEPT is a relational set operator.

2. In an SQL statement, the FROM clause specifies the table from which the data will be drawn.

9. A(n) UNION ALL statement query can be used to produce a relation that retains duplicate rows.

10. The INTERSECT statement can be used to combine rows from two queries, returning only the rows that appear in both sets.

11. The EXCEPT statement  in SQL combines rows from two queries and returns only the rows that appear in the first set but not in the second.

12. Which of the following subqueries can be used in place of INTERSECT if the RDBMS does not support it? IN subquery

13. Which of the following subqueries can be used in place of MINUS if the RDBMS does not support it? - NOT IN subquery

14. The following SQL statement uses a(n) Old-style join [Joining Tables using Where condition checks is an Old Style of joining Tables]

16. The statement SELECT * FROM T1, T2 produces a(n) cross join

Please let me know in case of any clarifications required. Thanks!