MySQL Questions and Answers – The from Clauses – 2

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

Answer: d
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

Answer: a
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’.
advertisement
advertisement

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

Answer: a
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.
advertisement

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

Answer: b
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

Answer: b
Explanation: None.
advertisement

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

Answer: b
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

Answer: a
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

Answer: b
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

Answer: b
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

Answer: b
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.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.