34,576
社区成员
发帖
与我相关
我的任务
分享
declare @i as float---此为系统所用表的字段类型
set @i=1535
-------------------------------------------
select cast(@i/1000 as decimal(38,2))
select cast(cast(@i as money)/1000 as decimal(38,2))
-------------------------------------------
select round(@i/1000,2)
select round(cast(@i as money)/1000,2)
结果:
1.53
(1 件処理されました)
1.54
(1 件処理されました)
1.53
(1 件処理されました)
1.5400
(1 件処理されました)