Home > Database > Mysql Tutorial > 10 recommended articles about decimal type

10 recommended articles about decimal type

黄舟
Release: 2017-06-15 15:53:13
Original
1726 people have browsed it

The following editor will bring you an article on the difference between Decimal type and Float Double in MySQL (detailed explanation). The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let's follow the editor and take a look. There are non-standard data types such as float and double in MySQL, as well as standard data types such as decimal. The difference is that non-standard types such as float and double store approximate values ​​in DB, while Decimal stores values ​​in the form of strings. Float and double types can store floating point numbers (that is, decimal types), but float has a disadvantage. When the data you give is an integer, it will process it for you as an integer. In this way, we naturally encounter problems when depositing and withdrawing currency values. My default value is: 0.00 and the actual storage is 0. Similarly, when I deposit and withdraw currency, it is 12.00, and the actual storage is 12. Fortunately, mysql provides two data types: decimal. This data type can easily solve the above problems: the decimal type is implemented by MySQL as the same type, which is specified in SQL9

1. Introducing the difference between Decimal type and Float Double in MySQL

10 recommended articles about decimal type

##Introduction: The editor will bring it to you below An article on the difference between Decimal type and Float Double in MySQL (detailed explanation). The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor to take a look.

2. In-depth understanding of MySQL advanced drifting (1)

10 recommended articles about decimal type

Introduction: Numeric types Numeric types are roughly divided into two categories: one is an integer, and the other is a floating point number or decimal. The commonly used integer type is the int type, and the allowed range is between (-2147483648, 2147483648). Common types of floating point numbers or decimals are: float, double and decimal types. float type (single-precision floating-point value); double type (double-precision floating-point value); decimal type (used in calculations that require very high precision; these types allow the precision and count of the value to be specified

3. C# Learning Diary 07---The decimal type of data type

10 recommended articles about decimal type

Introduction: C# specifically defines a decimal type (decimal) for us (previously, C/C++ did not have subtypes), which is mainly used for financial or currency calculations. The decimal type is a high-precision, The 128-bit data type can retain 28 or 29 significant digits (double only has 15 or 16 digits, which has been tested in the previous article). Although its value range is much smaller than double, it is more accurate than double.

4. mssql changes the database Float to decimal type and cannot modify the table

##Introduction: Many friends may It will appear when mssql modifies the database Float to decimal type, and the table cannot be modified. The query has been canceled because the estimated cost of this query (598) exceeds the configured threshold of 300. Contact the system administrator, let me tell you. Introduction

5.

MySQL data type-detailed explanation of decimal

# #Introduction: For things with relatively high precision, such as money, I will use the decimal type and will not consider float and double because they are prone to errors. Numeric and decimal are synonymous, num

6.

The difference between decimal and Number in Oracle

Introduction: Oracle only supports the decimal type grammatically, but actually under the hood It is the number type. The decimal type is supported to move data from the Oracle database to other places

7.

C# and sqlserver numerical data type learning

Introduction: C# numeric type data includes decimal, double and float. I have learned it before and have almost forgotten it now, so I will briefly review it now. According to MSDN's explanation, the decimal type is a 128-bit floating point number. The data range is 1.010 28 to 7.910 28. The precision is 28-29 significant digits. Adding m or M after a number indicates that it is a decimal type. do

8. mysql-MySQL query the number of all data for each month of the year

Introduction: MySQL Write a SQL statement to query the number of all data for each month of the year. The time field is uptime and is of decimal type

9. float and decimal types in MySQL_MySQL

Introduction : Float and decimal types in MySQL

10. Mysql data type usage instructions_MySQL

Introduction: FLOAT and DOUBLE types support approximate calculations using standard floating-point arithmetic. The DECIMAL type is used to store precise decimals. Because the CPU does not support direct calculation of DECIMAL, in Mysql5.0 and higher versions, the MYSQL server itself implements high-precision calculation of DECIMAL

[Related Q&A recommendations]:

java - How do database decimal types compare in size to String types?

BigDecimal precision loss problem after java reflection

The above is the detailed content of 10 recommended articles about decimal type. For more information, please follow other related articles on the PHP Chinese website!

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