AndreaNobili
AndreaNobili

Reputation: 42967

Some doubts related Microsoft SQL Server bigint

I have the following doubt related to Microsoft SQL Server. If a bigint column has a value as 0E-9, does it mean that this cell can contain value with 9 decimal digits or what?

Upvotes: 0

Views: 77

Answers (2)

S3S
S3S

Reputation: 25122

BIGINT:   -9,223,372,036,854,775,808 TO 9,223,372,036,854,775,807
INT:      -2,147,483,648 TO 2,147,483,647
SMALLINT: -32,768 TO 32,767
TININT:    0 TO 255

These are for storing non-decimal values. You need to use DECIMAL or NUMERIC to store values shuch as 112.455. When maximum precision is used, valid values are from - 10^38 +1 through 10^38 - 1.

OE-9 isn't NUMERICor INTEGER value. It's a VARCHAR unless you are meaning something else like scientific notation.

https://msdn.microsoft.com/en-us/library/ms187746.aspx

https://msdn.microsoft.com/en-us/library/ms187745.aspx

Upvotes: 1

Kevin
Kevin

Reputation: 473

No, the value would be stored as an integer. Any decimal amounts will be dropped off and only values to the left of the decimal will be kept (no rounding).

More specifically, bigint stores whole numbers between -2^63 and 2^63-1.

Upvotes: 0

Related Questions