|
decimal, decimal numbers
The term decimal describes a
datatype.
It can store
values,
i.e.
decimal numbers
betwenn -1038 and 1038 - 1. The datatype
decimal requires between 2 and 17
bytes of
storage.
Value range of the datatype decimal
The datatype decimal allows to define a precise range of values, where the number of digits stored before and after the decimal point must be provided. The
flag
"p" stands for "precision" and describes the mathematical accuracy. The flag "s" stands for "scale" which means the change in size of the given value. The flag "p" defines the exact amount of digits required over all. The flag "s" defines the exact number of digits after the decimal point. The value of the flag "p" must be greater or equal to the value of the flag "s" (p >= s).
For example, the datatype decimal(9,3) can store a value of maximum 9 digits with 3 digits on the right side of the decimal point.
See also:
bigint, Exact Numeric Datatypes, int, numeric, smallint, tinyint.
|