A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Datatypes: Exact Numeric Datatypes

numeric

The term numeric describes a datatype. It can store values, i.e. decimal numbers between -1038 and 1038 - 1. The datatype numeric requires between 2 and 17 bytes of storage.

Usage of the Datatype numeric

The datatype numeric provides a definition of a fixed range of values. The number of digits before and after the decimal point can be set exactly. The datatype numeric uses the two flags"p&quot and "s" to determine the exact range of values. The flag "p" is short for "precision" and, in this context means mathematical accuracy. The flag "s" is short for "scale" and in this context describes the transformation of a value through a factor. The Flag "p" defines the minimum number of required total digits. 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). If the flag "s" is defined with the value 0, the column can only be used as "identity column".

Thus, the datatype numeric(9,3) stores a value of maximum 9 digits, with three digits after the decimal point.

See also:

bigint,
decimal,
Exact Numeric Datatypes,
int,
smallint,
tinyint.