ExamVeda
Login
Home
This question belongs to MySQL MySQL Miscellaneous
MySQL Miscellaneous
?

What will be the output of the following MySQL command?
SELECT *
FROM person
WHERE emp_id IS NULL;

Answer & Solution
Correct Answer: Option A
This question asks about how MySQL handles finding rows where a specific column has a NULL value. Let's break it down:
SELECT * FROM person: This part tells MySQL to fetch all columns (*) from a table named "person."
WHERE emp_id IS NULL: This part specifies a condition. It's looking for rows where the "emp_id" column has a NULL value.
NULL is a special value in databases, meaning "no value" or "unknown."
So, the correct answer is:
Option A: Only those columns whose emp_id is NULL
The command will only return rows where the "emp_id" column is NULL, meaning those rows where there is no employee ID present.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.