如何在mysql中正确定义[float]数据类型(How to properly define the [float] data type in mysql)

编程入门 行业动态 更新时间:2024-10-28 21:28:58
如何在mysql中正确定义[float]数据类型(How to properly define the [float] data type in mysql)

我定义了(通过PHPMYADMIN)一个具有float数据类型的字段。 当我尝试插入一个数字78.556677099932222377时,它会将其转换为79。 如何保存正确的数字,小数点后至少7位?

I defined (through PHPMYADMIN) a field with the float data type. When I try to insert a number as 78.556677099932222377 it will translate it to 79. How do I make it to save the correct number, at least 7 places after the decimal dot?

最满意答案

使用结构选项打开phpMyAdmin并将float定义为:

FLOAT(23,19)

在这张图片中清楚: 在此处输入图像描述

Open phpMyAdmin with structure option and define the float as:

FLOAT(23,19)

clear in this picture: enter image description here

更多推荐

本文发布于:2023-08-07 23:24:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1466478.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据类型   定义   正确   如何在   float

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!