MySQL Questions and Answers – Condition Types – 2

This set of MySQL Multiple Choice Questions & Answers (MCQs) focuses on “Condition Types – 2”.

1. What is the meaning of “Range Conditions”?
a) Expression is equal to Expression
b) Expression is not equal to Expression
c) Expression fall under certain range
d) None of the mentioned
View Answer

Answer: c
Explanation: None.

2. Which among the following data types can be used with “Range Condition”?
a) Numeric data type
b) Temporal data type
c) String data type
d) Both Numeric and Temporal data type
View Answer

Answer: d
Explanation: None.

3. The following MySQL statement belongs to which “Condition Types”?

advertisement
advertisement
SELECT emp_id, fname, lname
FROM account
WHERE start_date<2007-10-08’;

a) Equality conditions
b) Inequality condition
c) Range condition
d) None of the mentioned
View Answer

Answer: c
Explanation: In the following query expression fall under certain ranges.

4. What will be the output of the following MySQL statement?

SELECT *
FROM employee
WHERE start_date BETWEEN2007-01-01’ AND2008-01-01’;

a) All employees details between 2007 and 2008
b) All employees details before 2008
c) All employees details from 2007 to 2008
d) None of the mentioned
View Answer

Answer: a
Explanation: “BETWEEN” operator is used for upper – upper limit.
advertisement

5. Fill the blanks with suitable options?
BETWEEN ______ AND ______
a) Upper and lower limit
b) Lower and upper limit
c) Upper and upper limit
d) None of the mentioned
View Answer

Answer: b
Explanation: None.
advertisement

6. What will be the output of the following MySQL statement?

SELECT *
FROM employee
WHERE start_date>=2007-01-01’ AND
        Start_date<=2005-01-01’

a) All employees between 2007 and 2005
b) All employees from 2007 to 2005
c) Empty set
d) None of the mentioned
View Answer

Answer: d
Explanation: No query can have a date which is greater than ‘2007-01-01’ but less than ‘2005-01-01.

7. What will be the output of the following MySQL statement?

SELECT customer_id, product_id, avail_balance
FROM account
WHERE avail_balance BETWEEN 3000 AND 5000.

a) Only those details will be shown whose as available balance form 3000 to 5000
b) Only those details will be shown whose available balance is more than 3000
c) Only those details will be shown whose available balance is less than 5000
d) None of the mentioned
View Answer

Answer: a
Explanation: None.

8. Which among the following operators is/are belongs to “Inequality conditions”?
a) <>
b) !=
c) =
d) Both <> and !=
View Answer

Answer: d
Explanation: None.

9. Which among the following operators is/are belongs to “Equality conditions”?
a) <>
b) !=
c) =
d) >/<
View Answer

Answer: c
Explanation: None.

10. Which among the following operators is/are belongs to “Range conditions”?
a) <>
b) !=
c) =
d) >/<
View Answer

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