MySQL删除重复数据
重复数据如图所示
自关联,保留id最小的那一条,其它的都删除
DELETE t1
FROM
invest_year t1,
invest_year t2
WHERE
t1.pro_id = t2.pro_id
AND t1.pro_year = t2.pro_year
AND t1.id > t2.id;
DELETE语法如下图所示
Double类型转BigDecimal
Double d = new Double(99.99);
BigDecimal b = new BigDecimal(d.toString());
BigDecimal b1 = new BigDecimal("99.99");