MySQL Questions and Answers – Conditional Evaluation

This set of MySQL Multiple Choice Questions & Answers (MCQs) focuses on “Conditional Evaluation”.

1. Which of the following operators is/are used in “Condition Evaluation”?
a) AND
b) OR
c) NOT
d) All of the mentioned
View Answer

Answer: d
Explanation: None.

2. Which of the following statements is/are correct?
a) True AND true =true
b) True AND false= false
c) False AND false= false
d) All of the mentioned
View Answer

Answer: d
Explanation: None.

3. Which of the following statements is/are correct?
a) True OR true =true
b) True OR false= true
c) False OR false= false
d) All of the mentioned
View Answer

Answer: d
Explanation: None.
advertisement
advertisement

4. Which of the following statements is/are correct?
a) NOT(true)=false
b) NOT(false)=true
c) Both NOT(true)=false and NOT(false)=true
d) None of the mentioned
View Answer

Answer: c
Explanation: None.

5. Which of the following statements is/are correct?
a) NOT(true AND true) =false
b) NOT(false AND false)=true
c) NOT (true AND false)= true
d) All of the mentioned
View Answer

Answer: d
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Which of the following statements is/are correct?
a) NOT(true OR true) = false
b) NOT(false OR false)= true
c) NOT (true OR false)= false
d) All of the mentioned
View Answer

Answer: d
Explanation: None.

7. What will be the result of the following MySQL command?

advertisement
WHERE TITLE= ‘teller’ AND start_date < ’2007-01-01’

a) Only tellers who began working for the bank prior to 2007 will be included
b) Any employee who is either not a teller or began working for the bank in 2007 or later will be removed from consideration
c) Only tellers who began working for the bank prior to 2007 will not be included
d) None of the mentioned
View Answer

Answer: a
Explanation: The operator “AND” will evaluate only those sets which satisfy both side.
advertisement

8. What will be the result of the following MySQL command?

WHERE TITLE=’teller’ OR start_date=2007-01-01’

a) The employee is a teller and was employed prior to 2007
b) The employee is a teller and was employed after January 1, 2007
c) The employee is something other than a teller but was employed prior to 2007
d) All of the mentioned
View Answer

Answer: d
Explanation: The operator “OR” will evaluate all result which satisfies either side of the query.

9. What will be the result of the following MySQL command?

WHERE end_date IS NULL 
AND (title=’teller’ OR start_date < ‘2007-01-01’)

a) Only those rows will be selected whose” end_date” should be NULL
b) Only those rows are selected whose “TITLE” should be ‘teller’
c) Only those employee will be selected who joined the organisation prior to 2007
d) All of the mentioned
View Answer

Answer: a
Explanation: None.

10. What will be the result of the following MySQL command?

WHERE end_date IS NULL 
AND NOT (title=’teller’ OR start_date < ‘2007-01-01’)

a) The result set contains non terminated employees who both are non tellers and started working for the bank from 2007 or later
b) The result set contains employees who both are tellers and started working for the bank in 2007 or later
c) The result set contains employees who are only tellers
d) All of the mentioned
View Answer

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

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

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.