当在sql Server 05中划分2个十进制(30,10)数字时,2个最后的小数似乎丢失(甚至没有舍入,只是截断).
例如:
Declare @x decimal(30,10) Declare @y decimal(30,10) Declare @z decimal(30,10) select @x = 2.1277164747 select @y = 4.8553794574 Select @z = @y/@x select @z
结果:2.2819673100
但是,如果将2个被分割的数字转换为浮点数似乎有效:
.... Select @z = cast(@y as float)/cast(@x as float) select @z
结果:2.2819673181