NUMERIC is an exact numeric data type for values that need controlled accuracy. Its declaration sets precision, the total number of significant digits, and scale, the number of digits stored to the right of the decimal point. section 4.7
Use NUMERIC for fixed-point values such as money, where small rounding differences can become costly. In many database systems, NUMERIC and DECIMAL have no real differences, so either type may be suitable after checking the system's documentation. section 4.7
Read a declaration such as NUMERIC(8, 2) in two parts:
- 8 is the precision: the total number of digits allowed. section 4.7
- 2 is the scale: the number of digits allowed to the right of the decimal point. section 4.7
- Choose the scale to match the required accuracy; monetary values commonly use 2 places for cents, while larger operations may need more. section 4.7
A recommended price
For a spaceship entity, define recommended_price as NUMERIC(8, 2). This allows eight digits in total and two digits after the decimal point, providing an exact fixed-point representation for the price. section 8.5 section 4.7
Reading a decimal value
The value 12.3456 has precision 6 and scale 4. This example separates the total digit count from the count of fractional digits. section 4.7





