QuestionQ204

VerifiedUsing the SET Operators

Review the exhibits and inspect the structures of the PRODUCTS and SALES tables.

Exhibit 1:

Question Image

Exhibit 2:

Question Image

Which two SQL statements would produce the same output?

Choose two
Explanation

INTERSECT returns the distinct PROD_ID values that occur in both tables. An equijoin between PRODUCTS and SALES on PROD_ID, with DISTINCT applied to the selected product IDs, returns that same set of common product IDs.

Community Discussion

No comments yet. Be the first to start the discussion!