This set of MySQL Multiple Choice Questions & Answers (MCQs) focuses on “The from Clauses – 2”.
1. What is the use of “VIEW” in Mysql?
a) To hide columns from the users
b) To hide the complexity of the database
c) To simplify complexity of database design
d) All of the mentioned
View Answer
Explanation: None.
2. Is there any error in the following MySQL statement?
SELECT e.emp_id, e.fname,e.lname,d.name FROM employee e INNER JOIN department d ON e.dept_id=e.dept_id;
a) NO
b) YES
c) DEPEND
d) None of the mentioned
View Answer
Explanation: There will be no error in the query, as table name “employee” is replaced by ‘e’ and table name “department” is replaced by‘d’.
3. Is there any error in the following MySQL statement?
SELECT e.emp_id, e.fname,e.lname,d.name FROM employee AS e INNER JOIN department AS d ON e.dept_id=e.dept_id;
a) NO
b) YES
c) DEPEND
d) None of the mentioned
View Answer
Explanation: There will be no error in the query, as table name “employee” is replaced by ‘e’ and table name “department” is replaced by ‘d’ by using “AS” keyword.
4. What will be the output of the following MySQL statement “true AND Null”?
a) True
b) Null
c) Depend
d) None of the mentioned
View Answer
Explanation: None.
5. What will be the output of the following MySQL statement “false AND Null”?
a) False
b) Null
c) Depend
d) None of the mentioned
View Answer
Explanation: None.
6. What will be the output of the following MySQL statement “Null AND Null”?
a) True
b) Null
c) False
d) None of the mentioned
View Answer
Explanation: None.
7. What will be the output of the following MySQL statement “true OR Null”?
a) True
b) Null
c) False
d) None of the mentioned
View Answer
Explanation: None.
8. What will be the output of the following MySQL statement “false OR Null”?
a) True
b) Null
c) False
d) None of the mentioned
View Answer
Explanation: None.
9. What will be the output of the following MySQL statement “Null OR Null”?
a) True
b) Null
c) False
d) None of the mentioned
View Answer
Explanation: None.
10. What will be the output of the following MySQL statement “NOT (Null)”?
a) True
b) Null
c) False
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.
- Check Information Technology Books
- Apply for Programming Internship
- Check MySQL Books
- Practice Programming MCQs