I have tickets table with nat_curr_amount of type float. Why is it not saving correct value for higher values?
mysql> update tickets set nat_curr_amount = 60.5 where id = 19;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select nat_curr_amount from tickets where id = 19;
+-----------------+
| nat_curr_amount |
+-----------------+
| 60.5 |
+-----------------+
1 row in set (0.00 sec)
mysql> update tickets set nat_curr_amount = 600004.5 where id = 19;
Query OK, 1 row affected (0.04 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select nat_curr_amount from tickets where id = 19;
+-----------------+
| nat_curr_amount |
+-----------------+
| 600004 |
+-----------------+
1 row in set (0.00 sec)
mysql> update tickets set nat_curr_amount = 6000004.5 where id = 19;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select nat_curr_amount from tickets where id = 19;
+-----------------+
| nat_curr_amount |
+-----------------+
| 6000000 |
+-----------------+
1 row in set (0.00 sec)
mysql>