2012年3月27日星期二

Float and Bigint

In SQL 2005, the Float has storage size 4 or 8 bytes, how does it has
range -2.23E308 to 2.23E308?
For BigInt, it has 8 bytes but has range -2E63 to 2E63-1?> In SQL 2005, the Float has storage size 4 or 8 bytes, how does it has
> range -2.23E308 to 2.23E308?
Float follows the IEEE 754 specification regarding approximate numeric
types. A wide range of values can be stored but not all decimal values
within the range can be exactly represented.
> For BigInt, it has 8 bytes but has range -2E63 to 2E63-1?
No, the bigint range from the Books Online is:
Integer (whole number) data from -2^63 (-9,223,372,036,854,775,808)
through 2^63-1 (9,223,372,036,854,775,807).
Hope this helps.
Dan Guzman
SQL Server MVP
"Alan T" <alanNOSPAMpltse@.yahoo.com.au> wrote in message
news:eK6eafT6HHA.484@.TK2MSFTNGP06.phx.gbl...
> In SQL 2005, the Float has storage size 4 or 8 bytes, how does it has
> range -2.23E308 to 2.23E308?
> For BigInt, it has 8 bytes but has range -2E63 to 2E63-1?
>

没有评论:

发表评论