摘要:
在sql中,要對數值進行四捨五入,numeric,decimal 等函數都不允許設置參數變量,1.cast(@value as numeric(18,@decount))2.cast(@value as decimal(18,@deccount))都報錯.有效的sql四捨五入方法:declare @value float,@morecount int,@decount int--@value:要進行四捨五入的數值--@morecount:任意大於要保留的小數位數的值--@decount:要保留的小數位數select LTRIM(STR(CAST(@value as decimal(20, @m 阅读全文
posted @ 2011-10-14 13:58
陈适珍
阅读(797)
评论(0)
推荐(1)
浙公网安备 33010602011771号