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

Which among the following are the correct representation of "float(4,2)"?

Answer & Solution
Correct Answer: Option D
This question is about how MySQL stores numbers with decimal points.
"float(4,2)" tells MySQL to store a number with a total of 4 digits and 2 digits after the decimal point.
Let's break down the options:
Option A: 24.33 - This fits the format because it has 4 total digits (2 before the decimal and 2 after).
Option B: 124.4 - This also fits the format because it has 4 total digits (3 before the decimal and 1 after).
Option C: 12.123 - This does not fit the format because it has 5 total digits (2 before the decimal and 3 after).
The correct answer is Option D: Both 24.33 and 124.4 because both of these numbers fit the "float(4,2)" format.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.