ExamVeda
Login
Home
This question belongs to MySQL MySQL Miscellaneous
MySQL Miscellaneous
?

If a column is expected to store values up to 2 million, the best datatype for it is . . . . . . . .

Answer & Solution
Correct Answer: Option D
This question is asking about the best data type to store a large number in a MySQL database.
Let's break down the options:
TINYINT can store small numbers from -128 to 127.
SMALLINT stores numbers from -32,768 to 32,767.
MEDIUMINT stores numbers from -8,388,608 to 8,388,607.
BIGINT stores numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

Since we need to store values up to 2 million, BIGINT is the best choice because it can handle the largest range of numbers.

Answer: D) BIGINT
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.