If a field is an integer in SQL Server with the precision scale set to 4, what is the largest number it can hold?
Printable View
If a field is an integer in SQL Server with the precision scale set to 4, what is the largest number it can hold?
9999
Integers: (-2,147,483,648) - (2,147,483,647) (same as VB Long)
SmallInt: (-32768) - (32767) (same as VB Integer)
TinyInt: (0) - (255)
Who's right?:confused:
A length of 4 means 4 bytes so numbers from -2,147,483,648 through 2,147,483,647. is right
Well done Scald2k
MSDN
boy is my face red, while being technically right about the length i should really learn to read the questions :D
From MSDN:
You can't change the precision, length or scale of an Integer in SQL Server... can you?Quote:
For example, an int data type can hold 10 digits, is stored in 4 bytes, and does not accept decimal points. The int data type has a precision of 10, a length of 4, and a scale of 0.