Relation A
Name Year Sumit 1st Nidhi 2nd Pradeep 3rd Jyoti 2nd
Relation B
Name Year Anand 1st Pradeep 3rd Jyoti 2nd Ashutosh 4th
Which operation on relations above will give the following result?
Name Year Sumit 1st Nidhi 2nd
Relation A
| Name | Year |
|---|---|
| Sumit | 1st |
| Nidhi | 2nd |
| Pradeep | 3rd |
| Jyoti | 2nd |
Relation B
| Name | Year |
|---|---|
| Anand | 1st |
| Pradeep | 3rd |
| Jyoti | 2nd |
| Ashutosh | 4th |
Which operation on relations above will give the following result?
| Name | Year |
|---|---|
| Sumit | 1st |
| Nidhi | 2nd |
Solution
MINUS (set difference) 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.
Related questions:
2026: 24 May Shift 1
2026: 29 May Shift 2
2025: 20 May Shift 1
2025: 15 May Shift 2
2025: 30 May Shift 2