SQL Server 2008 cannot define decimal type with 4 decimal places?
I am using SQL Server 2008 express, any reason?? however, if i convert to decimal(6,4) i开发者_如何学Gos work. e.g. Select CONVERT(decimal(6,4),'1.1234'); thanks you.
decimal(x,y)
x: total number of digits(max)
y: number of digits after decimal point(max)
thats why y<=x
decimal(Precision, Scale). The Precision number control the maximum number of digits on the left side of the period. The Scale specifies the maximum number of digits on the right side.
If you want 3 digits before decimal and 4 after decimal then
rate decimal(7, 4)
精彩评论