insert numbers values(1.5,1.5,1.5) select * from numbers go
答案是1、2和1.50的结果集,我想问的是那个2怎么来的?
------解决方案--------------------
四舍五入
SQL code
select cast(1.4 as numeric(5,0)) as num1,cast(1.5 as numeric(5,0)) as num2
/**
num1 num2
--------------------------------------- ---------------------------------------
1 2
(1 行受影响)
**/