maximum value is 2,147,483,647 for INTEGER.
BIGINT
The BIGINT data type stores a 64-bit signed integer. The minimum value is -
9,223,372,036,854,775,808 and the maximum value is 9,223,372,036,854,775,807 for BIGINT.
DECIMAL(precision, scale) or DEC(p,s)
DECIMAL(p, s) is the SQL standard notation for fixed-point decimal. "p" specifies precision or the
number of total digits (the sum of whole digits and fractional digits). "s" denotes scale or the number
of fractional digits. For example, if a column is defined as DECIMAL(5, 4), the numbers 3.14, 3.1415,
3.141592 are stored in the column as 3.1400, 3.1415, 3.1416, respectively keeping the specified
precision(5) and scale(4).
The precision p, can range from 1 to 34. The scale can range from 0 to p. If the scale is not specified, it
defaults to 0.
When precision and scale are not specified, DECIMAL becomes a floating-point decimal number. In
this case, precision and scale can vary within the range 1 to 34 for precision and -6,111 to 6,176 for
scale depending on the stored value.
Examples: 0.0000001234 (1234 x 10-10) has the precision 4 and the scale 10. 1.0000001234
(10000001234 x 10-10) has the precision 11 and scale 10. 1234000000 (1234x106) has the precision 4
and scale -6.
When precision and scale are not specified, DECIMAL becomes a floating-point decimal number. In
this case, precision and scale can vary within the range described above, 1~34 for precision and -
6,111~6,176 for scale depending on the stored value.
SMALLDECIMAL
The SMALLDECIMAL is a floating-point decimal number. The precision and scale can vary within the
range, 1~16 for precision and -369~368 for scale depending on the stored value. SMALLDECIMAL is
supported only on column store.
DECIMAL and SMALLDECIMAL are floating-point types. For instance, a decimal column can store any
of 3.14, 3.1415, 3.141592 whilst maintaining their precision.
DECIMAL(p, s) is the SQL standard notation for fixed-point decimal. For instance, 3.14, 3.1415,
3.141592 are stored in a decimal(5, 4) column as 3.1400, 3.1415, 3.1416, respectively keeping the
specified precision(5) and scale(4).
REAL
The REAL data type specifies a single-precision 32-bit floating-point number.
DOUBLE
The DOUBLE data type specifies a single-precision 64-bit floating-point number. The minimum value is
-1.79769 x 10308 and the maximum value is 1.79769x10308 . The smallest positive DOUBLE value is
2.2207x10-308 and the largest negative DOUBLE value is -2.2207x10-308.
FLOAT(n)
The FLOAT(n) data type specifies a 32-bit or 64-bit real number, where n specifies the number of
significant bits and can range between 1 and 53.
When you use the FLOAT(n) data type, if n is smaller than 25, it becomes a 32-bit REAL data type. If n
is greater than or equal to 25, it then becomes a 64-bit DOUBLE data type. If n is not declared, it
becomes a 64-bit double data type by default.
Character String Types
The character string data types are used to store values that contain character strings. While VARCHAR data
types contain ASCII character strings, NVARCHAR are used for storing Unicode character strings.
VARCHAR
The VARCHAR(n) data type specifies a variable-length ASCII character string, where n indicates the
maximum length and is an integer between 1 and 5000.
NVARCHAR
The NVARCHAR(n) data type specifies a variable-length Unicode character set string, where n
indicates the maximum length and is an integer between 1 and 5000.
ALPHANUM
The ALPHANUM(n) data type specifies a variable-length character string which contains alpha-
numeric characters, where n indicates the maximum length and is an integer between 1 and 127.