Home » MYSQL » Data Types » Question
  1. If an integer column is used for the values in range 1 to 99999, the best suitable datatype is ____________.
    1. SMALLINT UNSIGNED
    2. SMALLINT SIGNED
    3. MEDIUMINT SIGNED
    4. MEDIUMINT UNSIGNED
    5. None of these
Correct Option: D

Since the range starts from the positive value 1, it is best to keep the datatype as UNSIGNED. The maximum value is of the order of 10^5, so a MEDIUMINT datatype is well suited.



Your comments will be displayed only after manual approval.