What does the mysql field mean by DECIMAL 9,2 field?

Updated on technology 2024-03-12
4 answers
  1. Anonymous users2024-02-06

    In the MySQL field decimal(9,2), 9 is the fixed-point precision and 2 is the number of decimal places.

    There is such a formula: decimal(a,b).

    where a specifies the maximum number of decimal digits that can be stored to the left and right of the specified decimal point, with a maximum precision of 38;

    b specifies the maximum number of decimal digits that can be stored to the right of the decimal point, and the number of decimal places must be a value between 0 and a.

    Recognize the number of decimal places as 0.

    MySQL is a relational database management system developed by MySQL AB in Sweden and is now part of Oracle. MySQL is one of the most popular relational database management systems, and when it comes to web applications, MySQL is the best RDBMS (Relational Database Management System) application.

  2. Anonymous users2024-02-05

    Numeric and Decimal types are implemented by MySQL in the same type, which is allowed in the SQL92 standard. They are used to hold values that have important requirements for accurate accuracy, such as money-related data. When a column is declared with one of them, the precision and numerical range can (usually) be specified; For example:

    salary decimal(5,2)

    In this example, 5 (precision) represents the number of significant decimal digits, and 2 (scale) represents the number of digits after the decimal point. In this case, therefore, the salary column can store values ranging from to . (Actually, mysql can store values in this column all the way up to , because it doesn't store a sign for positive numbers).

    decimal(9,2)

    9 is the fixed-point precision and 2 is the number of decimal places.

    decimal(a,b)

    aSpecify the maximum number of decimal digits that can be stored to the left and right of the specified decimal point, with a maximum precision of 38.

    bSpecifies the maximum number of decimal digits that can be stored to the right of the decimal point. The number of decimal places must be a value between 0 and a. The default number of decimal places is 0.

    MySQL relational database management system is developed by MySQL AB in Sweden and currently belongs to Oracle. MySQL is one of the best RDBMS (Relational Database Management System) applications for web applications. MySQL is a relational database management system that keeps data in different tables instead of putting all the data in one large warehouse, which increases speed and flexibility.

    The SQL language used by MySQL is the most commonly used standardized language used to access databases. MySQL software adopts a dual licensing policy, it is divided into community version and commercial version, due to its small size, fast speed, low total cost of ownership, especially the characteristics of open source, generally small and medium-sized developers choose MySQL as the database. Due to the excellent performance of the Community Edition, it can be used in combination with PHP and Apache to form a good development environment.

    The SQL language used by MySQL is the most commonly used standardized language used to access databases.

  3. Anonymous users2024-02-04

    decimal(9,2)

    9 is the fixed-point precision, and BAY2 is the decimal du

    Number of digits. decimal(a,b)

    aSpecify the specified decimal point

    The left and right sides can be answered with the maximum number of stored decimal digits with a maximum precision of 38.

    bSpecifies the maximum number of decimal digits that can be stored to the right of the decimal point. The number of decimal places must be a value between 0 and a. The default number of decimal places is 0.

  4. Anonymous users2024-02-03

    Indicates that the value of the field is null

Related questions
4 answers2024-03-12

Troubleshooting. Remove the redo log file you are currently using, and then you can try to start the database, but it fails! >>>More

4 answers2024-03-12

After turning it on, there is no downtime, error or anything, and it will continue to be carried out.

9 answers2024-03-12

Add the field status to varchar(10) in the database table

update database table name set status = from database table name inner join temporary table name b on database table name. qh = and database table name. tel = >>>More

6 answers2024-03-12

You need to write a stored procedure that can do the above functionality! After all, what you're describing has a branching structure!

2 answers2024-03-12

1. MySQL database has several configuration options that can help us capture inefficient SQL statements in a timely manner1, Slow Query Log >>>More