Number Type details)

Source: Internet
Author: User
1>. Number Type Details:
Oracle number datatype Syntax: Number [(precision [, scale])]
Short for: precision --> P
Scale --> S

Number (P, S)
Range: 1 <= P <= 38,-84 <= S <= 127
Data storage range:-1.0e-130 <= number value <1.0e + 126
Saved in the machine range: 1 ~ 22 bytes

Valid: the number of digits from the first digit not 0 on the left.
S:
S> 0
Accurate to the second place to the right of the decimal point, and rounded. Then, check whether the valid bit is <= P.
S <0
It is accurate to the second place on the left of the decimal point, and rounded up. Then, check whether the valid bit is <= P + | S |.
S = 0
In this case, number indicates an integer.

Eg:
Actual data specified as stored
----------------------------------------
123.89 number 123.89
123.89 number (3) 124
123.89 number (123.89)
123.89 number (6, 1) 123.9
123.89 number () exceeds precision (valid bits: 5, 5> 4)
123.89 number (6,-2) 100
. 01234 number (01234). (effective bit: 4)
. 00012 number (00012 ).
. 000127 number (00013 ).
. 0000012 number (0000012 ).
. 00000123 number (0000012 ).
1.2e-4 Number (2, 5) 0.00012
1.2e-5 Number (0.00001)
123.2564 number 123.2564
1234.9876 number (1234.99)
12345.12345 number () error (valid bit: 5 + 2> 6)
1234.9876 number (6) 1235 (S does not indicate s = 0)
12345.345 number (5,-2) 12300
1234567 number (5,-2) 1234600
12345678 number (5,-2) error (valid 8> 7)
123456789 number (5,-4) 123460000
1234567890 number (5,-4) error (valid value: 10> 9)
12345.58 number (*, 1) 12345.6
0.1 number (0.10000) error (, valid bit: 5> 4)
0.01234567 number (0.01235)
0.09999 number (0.09999)

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.