PostgreSQL除法保留小数

时间:2016-09-26 12:29:22   收藏:0   阅读:1391
select round(1::numeric/4::numeric,3);
结果为0.25

select round( cast ( 1 as numeric )/ cast( 4 as numeric),2);

原文:http://www.cnblogs.com/esther-qing/p/5908378.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!