DECIMAL(10, 2) is a data type used in databases to store fixed-point numbers. It specifies that the number can have a total of 10 digits, with 2 of those digits reserved for the fractional part.
Here's a breakdown:
- 10: The total number of digits that can be stored, including both the integer and fractional parts.
- 2: The number of digits that can be stored after the decimal point.
For example, a value like 12345678.90 would be valid, as it has 10 digits in total (8 before the decimal and 2 after). However, a value like 123456789.01 would not be valid because it exceeds the total digit limit of 10.
