import java.math.BigDecimal; import java.text.NumberFormat; public class Java中double类型的数据精确到小数点后两位 { /** * @param args */ public static void main(String[] args) { //1 double f = 749.1666666666666; BigDecimal b = new BigDecimal(f); double f1 = b.setSc…
需求:#将数字填充到对应金额单中 select substr(b.payMoney,length(b.payMoney),1) 分, substr(b.payMoney,length(b.payMoney)-1,1) 角, case when length(b.payMoney)-3 <=0 then '' else substr(b.payMoney,length(b.payMoney)-3,1) end 圆, case when length(b.payMoney)-4 <=0 then…