David
12/08/2021, 2:43 AMdb.decimal
.
if I set it as db.decimal(9,4)
, should it be like this <tel:1234567891234|123456789.1234>
or 12345.1234
?Jared Fraser
12/08/2021, 5:21 AMThe precision of a numeric is the total count of significant digits in the whole number, that is, the number of digits to both sides of the decimal point. The scale of a numeric is the count of decimal digits in the fractional part, to the right of the decimal point. So the number 23.5141 has a precision of 6 and a scale of 4. Integers can be considered to have a scale of zero.
https://www.postgresql.org/docs/10/datatype-numeric.htmlJared Fraser
12/08/2021, 5:23 AMStandard SQL requires that DECIMAL(5,2) be able to store any value with five digits and two decimals, so values that can be stored in the salary column range from -999.99 to 999.99.
Jared Fraser
12/08/2021, 5:23 AMDavid
12/08/2021, 5:39 AM