Introduction to DB2 numeric data types

Source: Internet
Author: User

The data types described below are DB2 numeric data types. There are six types. If you are interested in DB2 numeric data types, take a look.

DB2 numeric data types include SMALLINT, INTEGER, BIGINT, DECIMAL (p, s), REAL, and DOUBLE. All values have symbols and precision. Precision refers to the number of digits other than symbols in binary or decimal format. If the value of a number is greater than or equal to zero, the symbol is considered as positive.

* Small integer, SMALLINT: A small integer is a two-byte integer with a precision of 5 digits. The range of a small integer is-32,768 to 32,767.

* Big INTEGER, INTEGER, or INT: A big INTEGER is a four-byte INTEGER with a precision of 10 digits. The range of a large integer is-2,147,483,648 to 2,147,483,647.

* BIGINT: an integer of eight bytes with a precision of 19 characters. The range of a giant integer ranges from-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

* DECIMAL (p, s), DEC (p, s), NUMERIC (p, s), or NUM (p, s ): A decimal value is a compressed decimal number, which has an implicit decimal point. The compressed decimal number is stored in binary-coded decimal, BCD) Notation variants. The decimal place depends on the precision of the number p) and decimal place s ). Decimal place refers to the number of digits in the decimal part. It cannot be a negative number or be greater than the precision. The maximum precision is 31 bits. The decimal type ranges from-10 ** 31 + 1 to 10 ** 31-1.

* Single-precision floating-point (Single-precision floating point). REAL: Single-precision floating point is a 32-bit approximate value of a REAL number. The number can be zero, or in the range from-3.402E + 38 to-1.175E-37 or from 1.175E-37 to 3.402E + 38.

* Double-precision floating-point, DOUBLE, double precision, or FLOAT: Double-precision floating-point is a 64-bit approximate value of a real number. The number can be zero, or in the range from-1.79769E + 308 to-2.225E-307 or from 2.225E-307 to 1.79769E + 308.

The preceding section describes the DB2 numeric data types.

Analyze the advantages of the DB2 database

Three types of DB2 clients

Policy Selection for DB2 environment variable Management

Management tasks that can be completed by the DB2 Management Server

DB2 isolation level-read for implementation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.