MySQL Questions and Answers – Putting Perl DBI to Work

This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Putting Perl DBI to Work”.

1. RTF refers to ______________
a) Rich Text Format
b) Right Text Format
c) Rich Text Function
d) Right Text Function
View Answer

Answer: a
Explanation: RTF (Rich Text Format) is a format developed by Microsoft that is understood by many word processors. MS-Word is one such program. Many others such as ‘OpenOffice’ understand it too.

2. The function returning an array of row values is ______________
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()
View Answer

Answer: a
Explanation: The function ‘fetchrow_array()’ returns an array of row values. ‘fetchrow_arrayref()’ returns a reference to an array of row values. ‘fetch()’ is the same as fetchrow_arrayref().

3. The function returning reference to hash of row values is ______________
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()
View Answer

Answer: d
Explanation: The function ‘fetchrow_hashref()’ returns reference to hash of row values. ‘fetchrow_arrayref()’ returns a reference to an array of row values. ‘fetch()’ is the same as fetchrow_arrayref().
advertisement
advertisement

4. fetchrow_hashref() returns reference to hash of row values keyed by ______________
a) row name
b) column name
c) table name
d) database name
View Answer

Answer: b
Explanation: The function ‘fetchrow_hashref()’ returns reference to hash of row values, keyed by the column name. The function ‘fetchrow_arrayref()’ returns a reference to an array of row values.

5. The function returning reference to array of row values is ______________
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()
View Answer

Answer: b
Explanation: ‘fetchrow_arrayref()’ returns a reference to an array of row values. The function ‘fetchrow_hashref()’ returns reference to hash of row values. ‘fetch()’ is the same as fetchrow_arrayref().
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. What is the maximum non zero value for FLOAT?
a) 3.402823466E+38
b) 3.402823466E+37
c) 3.402823466E+39
d) 3.402823466E+35
View Answer

Answer: a
Explanation: In MySQL, each datatype has its own range. Data types give an idea of the kind of values and the ranges that a variable is allowed to store. The maximum non zero value for FLOAT is 3.402823466E+38.

7. What is the maximum non zero values for DOUBLE?
a) ±1.7976931348623157E+307
b) ±1.7976931348623157E+308
c) ±1.7976931348623157E+306
d) ±1.7976931348623157E+305
View Answer

Answer: b
Explanation: In MySQL, all the datatypes have their own ranges. Data types give an idea of the kind of values and the ranges that a variable is allowed to store. The maximum non zero value for DOUBLE is ±1.7976931348623157E+308.
advertisement

8. Illegal values converted to the appropriate ‘zero’ value for ______________
a) Numeric
b) String
c) ENUM
d) TIME
View Answer

Answer: d
Explanation: In MySQL, there are different ways to handle the illegal values for different datatypes for default. For date or time columns, illegal values are converted to the appropriate “zero” value for the type.

9. The column attribute provides unique numbers for identification is ______________
a) AUTO_INCREMENT
b) UNSIGNED
c) IDENTIFY
d) DESCRIBE
View Answer

Answer: a
Explanation: In MySQL, the mechanism for providing unique numbers is through the AUTO_INCREMENT column attribute. It enables the generation of sequential numbers automatically. This facilitates identification.
advertisement

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.