1. Registered User
Join Date
Dec 2003
Posts
1,074

So, I was looking through the documentation to see what the difference between NUMBER and INTEGER was, and I came across this def'n of NUMBER which confuses me:

Code:
```NUMBER(p,s) Number having precision p and scale s. The precision p
can range from 1 to 38. The scale s can range from -84 to 127.```
How could you ever store a value like

NUMBER (38,127)

It just doesn't make sense to me, these limits, knowing how "p" & "s" behave.

--=cf

2. Registered User
Join Date
Jun 2003
Location
West Palm Beach, FL
Posts
2,713

Chuck, read the next paragraphs of the manual:
NUMBER(p,s)

where:

• p is the precision, or the total number of significant decimal digits, where the most significant digit is the left-most nonzero digit, and the least significant digit is the right-most known digit. Oracle guarantees the portability of numbers with precision of up to 20 base-100 digits, which is equivalent to 39 or 40 decimal digits depending on the position of the decimal point.

• s is the scale, or the number of digits from the decimal point to the least significant digit. The scale can range from -84 to 127.

• Positive scale is the number of significant digits to the right of the decimal point to and including the least significant digit.

• Negative scale is the number of significant digits to the left of the decimal point, to but not including the least significant digit. For negative scale the least significant digit is on the left side of the decimal point, because the actual data is rounded to the specified number of places to the left of the decimal point. For example, a specification of (10,-2) means to round to hundreds.

Scale can be greater than precision, most commonly when e notation is used. When scale is greater than precision, the precision specifies the maximum number of significant digits to the right of the decimal point. For example, a column defined as NUMBER(4,5) requires a zero for the first digit after the decimal point and rounds all values past the fifth digit after the decimal point.

3. Registered User
Join Date
Dec 2003
Posts
1,074
weirdness. Thanks for pointing me to the answer ---=cf

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•