Skip to main contentSkip to solution

Relation A

NameYear
Sumit1st
Nidhi2nd
Pradeep3rd
Jyoti2nd

Relation B

NameYear
Anand1st
Pradeep3rd
Jyoti2nd
Ashutosh4th

Which operation on relations above will give the following result?

NameYear
Sumit1st
Nidhi2nd

Solution

✅ Correct Option: 3

MINUS (set difference) A−BA - B returns the tuples that are in Relation A but not in Relation B.

Pradeep (3rd) and Jyoti (2nd) appear in both relations, so they are removed. Sumit (1st) and Nidhi (2nd) appear only in A, so they remain.


Option 2: UNION would return all distinct rows from both relations, including Anand and Ashutosh.

Option 4: INTERSECTION would return only the common rows, Pradeep and Jyoti, which is the opposite of the given result.

Option 1: INNER JOIN combines rows on a matching condition, so it would keep only the matching rows (Pradeep and Jyoti), not the unmatched ones.

Keyboard Shortcuts

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