MySQL Forums
Forum List  »  General

Re: Percona MySQL 5.5 and 5.6 IFNULL function changes float data precision
Posted by: james wang
Date: November 27, 2018 04:28AM

1). mysql> create table testfloat (f1 float default null, f2 float default null);
2). mysql> insert into testfloat (f1) values (0.0052);
3). mysql> insert into testfloat (f2) values (0.0032);
4). mysql> select ifnull(f1,f2) from testfloat;
+-----------------------+
| ifnull(f1,f2) |
+-----------------------+
| 0.005200000014156103 |
| 0.0031999999191612005 |
+-----------------------+

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.