MySQL Questions and Answers – Condition Types – 1

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

1. Select odd one out?
a) Equality Conditions
b) Inequality Conditions
c) Range condition
d) Between
View Answer

Answer: d
Explanation: “Between” is an operator while others are conditions types.

2. The following MySQL query belongs to which condition types?

SELECT fname
FROM person
WHERE title=’TELLER’;

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

Answer: a
Explanation: In the following query column equate to the string value.
advertisement
advertisement

3. The following MySQL statement belongs to which condition types?

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!
SELECT fname
FROM person
WHERE fed_id=111-11-111’;

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

Answer: a
Explanation: In the following query column equate to the string value.
advertisement

4. The following MySQL statement belongs to which condition types?

SELECT fname
FROM person
WHERE dept_id= (SELECT dept_id FROM department WHERE names=’s’);

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

Answer: a
Explanation: In the following query column equate to the value returned by subquery.
advertisement

5. Is the following MySQL statement belongs to the “Equality condition”?

SELECT product_type.name, product.name
FROM product_type INNER JOIN Product
ON product_type.dept=Product.dept
WHERE product_type.name=’customers_accounts’;

a) Yes
b) No
c) Depends
d) None of the mentioned
View Answer

Answer: a
Explanation: In the following query there are two equality conditions “ON” and “WHERE”.

6. What is the meaning of “Equality Conditions”?
a) Equal to
b) Not equal to
c) Both Equal to and Not equal to
d) None of the mentioned
View Answer

Answer:a
Explanation: None.

7. What is the meaning of “Inequality Condition”?
a) Not equal to
b) Equal to
c) Both Not equal to and Equal to
d) None of the mentioned
View Answer

Answer: a
Explanation: None.

8. Does the following MySQL statement belong to the “Inequality condition”?

SELECT product_type.name, product.name
FROM product_type INNER JOIN Product
ON product_type.dept=Product.dept
WHERE product_type.name<>’customers_accounts’;

a) Yes
b) No
c) Depends
d) None of the mentioned
View Answer

Answer: a
Explanation: In the following query operator “<>” are inequality operator.

9. Does the following MySQL statement belong to the “Inequality condition”?

SELECT product_type.name, product.name
FROM product_type INNER JOIN Product
ON product_type.dept=Product.dept
WHERE product_type.name! =’customers_accounts’;

a) Yes
b) No
c) Depends
d) None of the mentioned
View Answer

Answer: a
Explanation: In the following query operator “!=” are inequality operator.

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.