22,207
社区成员
发帖
与我相关
我的任务
分享
select cast(floor(34.345*100)/100 as dec(18,2))
declare @table table (id varchar(10))
insert into @table
select 4.234 union all
select 34.345 union all
select 0.24
select cast(id as decimal(16,2)) as id from @table
select substring(id,1,charindex('.',id)+2) as id from @table
id
---------------------------------------
4.23
34.35
0.24
id
----------
4.23
34.34
0.24
cast(值 as dec(18,2))