select 300 / (301) *100

查询结果:0,由于数值是INT类型,无法得到小数点的结果。怎么整?分母加0.0

select 300 / (301 + 0.0) *100

查询结果:99.667700

更多推荐

SQL server 的除法运算