Home > Database > Mysql Tutorial > body text

mysql浮点型输出格式问题

WBOY
Release: 2016-06-06 09:44:11
Original
854 people have browsed it

mysql

drop table if exists d;
create table d(c double) engine=innodb;
insert into d values(1e-15),(1e-16);
select * from d;
在mysql数据库按以上语句建表,输出结果如下:
+-------------------+
| c |
+-------------------+
| 0.000000000000001 |
| 1e-16 |
+-------------------+
为什么1e-15按照正常输出,1e-16输出为1e-16,跪求mysql高人详细解释,感激不尽。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!