Meaning of decimal(18,2) Ms Sql Server

The actual syntax of the datatype is decimal(p,s).
So here, p is the precision and s is the scale.


The datatype Decimal(18,2)is used to represent numbers.The length of numbers should be totally 18. The length of numbers after the Decimal point should be 2 only and not more than that.


1234567898822222.88


The numbers to the left of decimal point should not be greater than 16.


The numbers to the right of decimal point should not be greater than 2.
(.) is excluded here in the length.


So,the overall length of the number cannot exceed the length 18.

Reference: Muthukumar (http://nadarmuthukumar.blogspot.in)

0 comments:

Twitter Delicious Facebook Digg Stumbleupon Favorites More