decimal and numeric

The exact numeric types—dec, decimal, and numeric—begin with an optional positive or negative sign and can include a decimal point.The value of exact numeric data depends on the column’s decimal precision and scale.

The syntax is:
datatype [(precision  [, scale ])]
SAP ASE treats each combination of precision and scale as a distinct datatype. For example, numeric (10,0) and numeric (5,0) are two separate datatypes. The precision and scale determine the range of values that can be stored in a decimal or numeric column:

If a value exceeds the column’s precision or scale, SAP ASE flags the entry as an error. Here are some examples of valid dec and numeric data:

Valid precision and scale for numeric data

Data entered

Datatype

Precision

Scale

Value

12.345

numeric(5,3)

5

3

12.345

-1234.567

dec(8,4)

8

4

-1234.567

The following entries result in errors because they exceed the column’s precision or scale:

Invalid precision and scale for numeric data

Data entered

Datatype

Precision

Scale

1234.567

numeric(3,3)

3

3

1234.567

decimal(6)

6

1