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 B
This question is about filtering data in a MySQL database.

The command `SELECT * FROM person WHERE emp_id IS NULL;` is asking the database to:

1. `SELECT *`: Retrieve all columns from the table called "person".
2. `FROM person`: Get the data from the "person" table.
3. `WHERE emp_id IS NULL`: Only include rows where the "emp_id" column has a NULL value.

So the answer is Option A: Only those columns whose emp_id is NULL

This means that the query will only show the information from rows where the "emp_id" column is empty or doesn't have a value.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.