你这样写法, float 转换为数据类型 numeric 时出现算术溢出错误select top 50 branchdesc,total,amount,cast(round(total/amount*100,2) as numeric(18,2)) from branchsale order by total desc试下这种写法
应该不会有错啊,要不,死马当活马医 select top 50 branchdesc,total,amount,cast(round(total/amount*100,2) as numeric(5,2))AS Done from branchsale order by total desc
from branchsale
order by total desc试下这种写法
select top 50 branchdesc,total,amount,cast(round(total/amount*100,2) as numeric(5,2))AS Done
from branchsale
order by total desc