QuestionQ35

VerifiedUsing the Set Operators

Review the following statement:

Question Image

What is returned when it is executed?

Explanation

Both component queries produce the identical row (1, 'John'). UNION returns only distinct rows, so the duplicate is eliminated and one row remains. ORDER BY 1 is valid for a compound query because it references the first select-list position.

Learn more

Community Discussion

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