第1个回答 推荐于2016-04-14
解决方案一:
select a,b,round(a/b,4) as c
from table_name
order by c;
解决方案二:
select to_char('454.4545484421','9999999.9999') "别名" from dual;
第2个回答 推荐于2017-12-15
把字段类型设置为decimal类型。
declare @a decimal(9,2),@b decimal(9,2) ,@c decimal(9,2)
set @a=100
set @b=3
select @c=@a/@b
print @c
oracle 用trunc(m,n)函数 n直接丢弃小数点几位本回答被提问者采纳