This set of MySQL Multiple Choice Questions & Answers (MCQs) focuses on “Null: the Four Letter Word”.
1. What is the meaning of “NULL” in Mysql?
a) Not applicable
b) Value not yet known
c) Value undefined
d) All of the mentioned
View Answer
Explanation: None.
2. Is the following statement is true/false?
“An expression can be NULL, but can never equal to NULL”
a) True
b) False
View Answer
Explanation: None.
3. Is the following statement is true/false?
“Two NULL values are equal to each other”
a) True
b) False
View Answer
Explanation: None.
4. Which operator is used to check whether the expression is “NULL”?
a) IS NULL
b) NOT NULL
c) ON
d) None of the mentioned
View Answer
Explanation: None.
5. Which operator is used to check the expression is not “NULL”?
a) IS NULL
b) NOT NULL
c) ON
d) None of the mentioned
View Answer
Explanation: None.
6. What will be the output of the following MySQL command?
SELECT * FROM person WHERE emp_id IS NULL;
a) Only those rows where the emp_id column is NULL
b) Only those rows where the emp_id column is not NULL
c) No output
d) None of the mentioned
View Answer
Explanation: None.
7. What will be the output of the following MySQL command?
SELECT * FROM person WHERE emp_id IS NOT NULL;
a) Only those rows where the emp_id column is NULL
b) Only those rows where the emp_id column is not NULL
c) No output
d) None of the mentioned
View Answer
Explanation: None.
8. What will be the output of the following MySQL command?
SELECT * FROM person WHERE emp_id = NULL;
a) Only those rows where the emp_id column is NULL
b) Only those rows where the emp_id column is not NULL
c) No output
d) None of the mentioned
View Answer
Explanation: An expression can never be equated to NULL that is why there will be no output.
9. What will be the output of the following MySQL command?
SELECT fname FROM person WHERE emp_id != 6;
a) Only those names whose emp_id is not equal to 6
b) Only those names whose emp_id is equal to 6
c) No output
d) None of the mentioned
View Answer
Explanation: None.
10. What will be the output of the following MySQL command?
SELECT fname FROM person WHERE emp_id != 6 OR emp_id IS NULL;
a) Only those names whose emp_id is not equal to 6 or emp_id with NULL values
b) Only those names whose emp_id is not equal to 6
c) Only those names whose emp_id is equal to 6
d) None of the mentioned
View Answer
Explanation: None.
Sanfoundry Global Education & Learning Series – MySQL Database.
To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Practice Programming MCQs
- Check Information Technology Books
- Apply for Programming Internship
- Check MySQL Books