NUMBER Type in Oracle. If the length and decimal point precision are not specified, the default length is long.

Source: Internet
Author: User
In Oracle, the Number type can be used to store 0, positive, negative, or floating point numbers. The data range can be 1.0*10 (-130) mdash; 9. 9... 9*10 (125)

In Oracle, the Number type can be used to store 0, positive, negative, or floating point numbers. The data range can be 1.0*10 (-130) mdash; 9. 9... 9*10 (125)

In Oracle, the Number type can be used to store 0, positive, negative, or floating point numbers. The data range can be 1.0*10 (-130) -- 9. 9... 9*10 (125) {38 9 followed by 88 0} digits. When the value of the mathematical expression in Oracle is greater than or equal to 1.0*10 (126, oracle Reports an error.

The data declaration of Number is as follows:

Description

Number (p, s) declares a fixed point p (precision) as the precision, s (scale) indicates the Number of digits on the right of the decimal point, the maximum precision is 38, the range of scale value is-84 to 127.

Number (p) declares an integer equivalent to Number (p, 0)

Number declares that the precision of a floating point is 38. Note that the scale value is not applied. That is to say, scale cannot be simply understood as 0 or another Number.

The precision (p) and Scale (s) of the number of points follow the following rules:

When the length of an integer is greater than p-s, Oracle Reports an error.

When the length of the fractional part of A number is greater than s, Oracle will round.

When s (scale) is a negative number, Oracle rounds the s number on the left of the decimal point.

When s> p, p indicates the maximum number of digits (s) to the left after the decimal point. If p is greater than p, Oracle Reports an error. The number (s) to the right after the decimal point is rounded

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.