SQL Server Data Types
Data Type | Description | Storage | Example |
---|---|---|---|
bit | Boolean values (0, 1, NULL). | 1 bit | 1, 0 |
tinyint | Small integer (0 to 255). | 1 byte | 127 |
smallint | Integer (-32,768 to 32,767). | 2 bytes | -12345 |
int | Integer (-231 to 231-1). | 4 bytes | 123456 |
bigint | Large integer (-263 to 263-1). | 8 bytes | 9223372036854775807 |
decimal(p,s)/numeric(p,s) | Fixed precision and scale. | Varies | 123.45 |
smallmoney | Currency values (-214,748.3648 to 214,748.3647). | 4 bytes | 5000.45 |
money | Larger currency range. | 8 bytes | 123456.78 |
0 Comments