SQL SERVER DATA TYPES
TRANSACT SQL DATA TYPES
Numeric Datatypes
Data Type Syntax
|
Maximum Size
|
Explanation
|
BIT
|
Integer that can be 0, 1, or NULL.
|
|
TINYINT
|
0 to 255
|
|
SMALLINT
|
-32768 to 32767
|
|
INT
|
-2,147,483,648 to 2,147,483,647
|
|
BIGINT
|
-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
|
|
DECIMAL(f,l)
|
f defaults to 18, if not specified.
l defaults to 0, if not specified. |
Where f is the total digits and l is the number of digits after the
decimal.
|
DEC(f,l)
|
f defaults to 18, if not specified.
l defaults to 0, if not specified. |
Where f is the total digits and l is the number of digits after the
decimal.
This is a synonym for the DECIMAL datatype. |
NUMERIC(f,l)
|
f defaults to 18, if not specified.
l defaults to 0, if not specified. |
Where f is the total digits and l is the number of digits after the
decimal.
This is a synonym for the DECIMAL datatype. |
FLOAT(val)
|
Floating point number.
val defaults to 53, if not specified. |
Where val is the number of number of bits to
store in scientific notation.
|
REAL
|
Equivalent to FLOAT(24)
|
|
SMALLMONEY
|
- 214,748.3648 to 214,748.3647
|
|
MONEY
|
-922,337,203,685,477.5808 to 922,337,203,685,477.5807
|
No comments:
Post a Comment