Java: public String dealRate(String s) { if (StringUtils.isNotBlank(s)) { if (s.indexOf(".") > 0) { //去掉多余的0 s = s.replaceAll("0+?$", ""); //如最后一位是.则去掉 s = s.replaceAll("[.]$", ""); return s; } return s; } return ""; } MySql: selec 0+CAST(字段 as char) 例:select 0+CAST(13.13000 as char)//输出13.13