250+ TOP MCQs on MySQL Datatypes and Answers

MySQL Multiple Choice Questions on “MySQL Datatypes”.

1. What will happen if the data being loaded into a text column exceeds the maximum size of that type?
a) Extra memory will be allocated
b) Process terminate
c) Data will be truncated
d) Depend on the system

Answer: c
Clarification: Mysql cannot allocate dynamic memory therefore if data exceeds the memory then extra data will be truncated.

2. Which data type is more suitable for storing “small notes” in Mysql?
a) Char
b) Varchar
c) Mediumtext
d) Longtext

Answer: c
Clarification: None.

3. Which data type is more suitable for storing “documents” in Mysql?
a) Varchar
b) Longtext
c) Mediumtext
d) Either Varchar or Longtext

Answer: b
Clarification: Longtext has largest range.

4. “Numeric Data” is used to store ____________
a) Whole numbers
b) Natural numbers
c) Rational numbers
d) Both Whole and Natural numbers

Answer: d
Clarification: None.

5. Which Numeric Data type has the largest range?
a) Mediumint
b) Smallint
c) Int
d) Tinyint

Answer: c
Clarification: None.

6. What will be the storage pattern for “float(4,2)” in Mysql?
a) Total of four digits, two to the left of decimal and two to the right of decimal
b) Total of six digits
c) Total of four digits, not distributed uniformly
d) None of the mentioned

Answer: a
Clarification: As per standards.

7. Which among the following are the correct representation of “float(4,2)”?
a) 24.33
b) 124.4
c) 12.123
d) Both 24.33 and 124.4

Answer: d
Clarification: Float(4,2) allowed at most 2 digit at right of the decimal and left of the decimal.

  250+ TOP MCQs on Putting PHP to Work and Answers

8. Which among the following is the correct representation of “float(5,0)”?
a) 12345.123
b) 12345.1
c) 12345
d) 123.123

Answer: c
Clarification: “float(5,0) says there should be total of five digit, in which no digit should be at the right of the decimal.

9. Which among the following is the correct representation of “float(1,1)”?
a) Total of 1 digit
b) Total of 2 digit
c) Total of 2 digit, one digit at right of the decimal, one digit at left of the decimal
d) None of the mentioned

Answer: a

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top