When I insert 78.9 into Mysql (using JDBC) it gets rounded up to 79? Is this normal ... if so how can I stop this from happening.
More details:
Column name: num
Data type: decimal(12,0)
* The above item was copied from phpMyAdmin
Query is
stmt.executeUpdate("INSERT INTO triples(sub_id, pro_id, num) VALUES("+subId+","+proId+",78.9)");
Ideally I would use a variable instead of the hard-coded 78.9
Such as
BigDecimal obj = new BigDecimal(78.9);