How to use MySQL floating-point data types
This article mainly shows you "how to use MySQL floating-point data types". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to use MySQL floating-point data types".
MySQL floating point data type
Floating-point declaration: float (MMagine D) double (MMagne D)
Decimal (MMagar D) M: total places D: decimal places
Mysql > Create table stu (num1 float (5) 2), num2 double (6))
MySQL supports scientific counting.
Mysql > insert into stu values (6E-2)
Floating point precision will be lost
Note: no digits are specified, float defaults to 6 digits after the decimal point. Double defaults to 17 bits.
The above is all the content of the article "how to use MySQL floating-point data types". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!