Skip to main contentSkip to solution

Consider the following two tables 'SPORTSSTUDENTS' and 'MUSICSTUDENTS'.

SPORTSSTUDENTS

MUSICSTUDENTS

What is the result of 'SPORTSSTUDENTS' - 'MUSICSTUDENTS' operation?

Solution

✅ Correct Option: 1

The difference operation R−SR - S returns the rows that are in RR but not in SS. Amit's row appears in both tables, so it is removed. Anil's row appears only in SPORTSSTUDENTS, so it stays.

NameEmail
Anil[email protected]

Option 2: this is the intersection of the two tables (rows common to both), not the difference.

Option 3: this is the result of the reverse operation, 'MUSICSTUDENTS' - 'SPORTSSTUDENTS'.

Option 4: this is just the original SPORTSSTUDENTS table, with nothing removed.

Set difference is not commutative, so R−S≠S−RR - S \neq S - R in general.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question