This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “MySQL Data Types – 5”.
1. The maximum non zero value for FLOAT is ___________
a) 3.402823466E+38
b) 3.402823466E+37
c) 3.402823466E+39
d) 3.402823466E+35
View Answer
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.
2. The maximum non zero values for DOUBLE is ___________
a) ±1.7976931348623157E+307
b) ±1.7976931348623157E+308
c) ±1.7976931348623157E+306
d) ±1.7976931348623157E+305
View Answer
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.
3. The storage size in bytes required for the MEDIUMINT datatype is ___________
a) 1
b) 2
c) 3
d) 4
View Answer
Explanation: The numeric datatypes used in MySQL vary over ranges. There are a variety of INT types in the type specification. TINYINT requires 1, SMALLINT requires 2 bytes and MEDIUMINT requires 3.
4. The size of the BIT type is ___________
a) 1
b) 2
c) 3
d) variable
View Answer
Explanation: All the numeric datatypes used in MySQL vary over the fields. However the maximum size is fixed. Unlike the other numeric types the size of the BIT datatype depends on the length of the field.
5. The REAL type is synonym for ___________
a) FLOAT
b) INT
c) DOUBLE
d) BIT
View Answer
Explanation: The REAL datatype, by default, is for the DOUBLE type. Floating point types can be defined as UNSIGNED. This eliminates the negative end of the type ranges. MySQL has a variety of default types.
6. The maximum number of elements allowed in SET() is ___________
a) 16
b) 32
c) 64
d) 128
View Answer
Explanation: The SET type specification is very useful for storing a collection a ordered and distinct elements. The storage size required for this datatype is variable and dependent on the cardinality.
7. The number of binary string types among the following is ___________
BINARY, VARBINARY, BLOB, CHAR
a) 1
b) 2
c) 3
d) 4
View Answer
Explanation: In MySQL, the string datatypes are broadly categorised into two, namely, binary string types and non binary string types. BINARY, VARBINARY and BLOB are the binary string datatypes.
8. The maximum size in bytes of a row in MySQL is __________
a) 65534
b) 65535
c) 65536
d) 65537
View Answer
Explanation: The allowable range of M for VARCHAR(M) syntactically is 1 to 65535, but the effective number of the maximum characters is less than 65535 since MySQL has a maximum row size of 65,535 bytes.
9. MEMORY tables do not support BLOB and TEXT indexes.
a) True
b) False
View Answer
Explanation: BLOB or TEXT columns sometimes can be indexed, depending on the storage engine. MEMORY tables do not support BLOB and TEXT indexes. The MEMORY engine does not support BLOB or TEXT.
10. MySQL works with spatial values in 3 formats.
a) True
b) False
View Answer
Explanation: MySQL works with the spatial values in three formats. They are the internal format, the Well-Known Text (WKT) and the Well-Known Binary(WKB) formats for the spatial datatypes.
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.
- Check Information Technology Books
- Practice Programming MCQs
- Apply for Programming Internship
- Check MySQL Books