Question:medium

Consider the following two tables emp1 and emp2:
emp1
IdName
1Amit
2Punita
emp2
IdName
1Punita
2Anand
What is the output of the following query?
SELECT name from emp1 minus SELECT name from emp2;

Updated On: Jan 16, 2026
  • Punita
  • Amit
  • Anand
  • Amit, Punita
Show Solution

The Correct Option is B

Solution and Explanation

To address the query, understanding the SQL MINUS operator is essential. This operator yields distinct rows from the first SELECT statement that are not found in the results of the second SELECT statement.
Examine the data from both tables:
emp1
IdName
1Amit
2Punita
emp2
IdName
1Punita
2Anand
Let's analyze the SQL query components:
The result of SELECT name from emp1 is:
  • Amit
  • Punita
The result of SELECT name from emp2 is:
  • Punita
  • Anand
Applying the MINUS operator involves:
  • Eliminating names present in both lists.
  • The name 'Punita' is common and is therefore removed.
The remaining name is:
  • Amit
Consequently, the output for the query SELECT name from emp1 minus SELECT name from emp2; is:
Amit
Was this answer helpful?
0