Q1011
What will be the output of the following MySQL command? SELECT * FROM person WHERE emp_id IS NULL;
A.
Only those columns whose emp_id is NULL
B.
Only those columns whose emp_id is not NULL
AnswerC.
No output
D.
None of the mentioned
Answer: Option B
Solution
Answer: Option B
Solution:
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.