Case Analysis of mysql floating-point Type
In this article, the editor introduces "mysql floating-point type case analysis" in detail, with detailed content, clear steps and proper handling of details. I hope this "mysql floating-point type case analysis" article can help you solve your doubts.
Description
1. MySQL's representation of decimals can be divided into floating-point numbers and fixed-point numbers. Floating point numbers include float (single precision) and double (double precision), and only decimal.
Fixed-point numbers are stored in MySQL as strings, which is more accurate than floating-point numbers and is suitable for representing high-precision data such as currencies.
2. Floating-point numbers and fixed-point numbers can be represented by adding "(MMagnetic D)" to the type name.
Example
Create the table tf, and set the id1,id2,id3 field to float (5L2), double (5L2), decimal (5L2) mysql > create table tf (id1 float (5L2), id2 double (5L2), id3 decimal (5L2)) After reading this, the article "mysql floating point type instance analysis" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow the industry information channel.