What is decimal data type in sql server?
-
The Decimal Data type can store exactly that, a decimal value. Within your example the 18 means, the number of digits that can be stored and the 0 us the number of digits that can be stored to the right of the decimal point. See http://www.w3schools.com/sql/sql_datatypes.asp[^] Thanks,
Personal Blog: A Software Programmer Twitter: JammoD
-
The Decimal Data type can store exactly that, a decimal value. Within your example the 18 means, the number of digits that can be stored and the 0 us the number of digits that can be stored to the right of the decimal point. See http://www.w3schools.com/sql/sql_datatypes.asp[^] Thanks,
Personal Blog: A Software Programmer Twitter: JammoD
In MySQL DB....
decimal(4,2) allows entering only a total of 4 digits. As you see in decimal(4,2), it means you can enter a total of 4 digits... out of which two digits are ment for keeping after the decimal point.
So, if you enter 100.0 in MySQL database, it will show an error like "Out of Range Value for column".
So, you can enter in this range only .... 00.00 to 99.99