Home > Database > Mysql Tutorial > How to use MySQL floating point data type

How to use MySQL floating point data type

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-05-28 10:30:28
forward
1211 people have browsed it

 MySQL floating point data type

Floating point declaration: float(M,D) double(M,D)

Decimal(M,D) M:Total Digits D: Number of decimal places

 mysql>Create table stu(
  num1 float(5,2),
  num2 double(6,1)
  )
Copy after login

MySQL supports scientific notation

mysql>insert  into  stu values(6E-2)
Copy after login

Floating point precision will be lost

Note: Not specified The number of digits, float defaults to 6 digits after the decimal point. Double defaults to 17 bits.

The above is the detailed content of How to use MySQL floating point data type. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
Mysql cannot start
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template