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

The best datatype for a column that is expected to store values up to 2 million is . . . . . . . .

Answer & Solution
Correct Answer: Option D
This question asks you to choose the best data type for a column that will store large numbers, up to 2 million. Let's break down the options:
Option A: SMALLINT - Stores small integers, typically from -32,768 to 32,767. Not big enough for 2 million.
Option B: TINYINT - Stores even smaller integers, typically from -128 to 127. Definitely not big enough.
Option C: MEDIUMINT - Stores integers up to 8,388,607. Still not large enough for 2 million.
Option D: BIGINT - Stores large integers, typically from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. This is the largest integer type in MySQL and perfect for numbers up to 2 million.
So the answer is D: BIGINT
It's the most suitable data type for handling such large numbers.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.