What accuracy and scale mean in an Oracle NUMBER data type

I read the beginner's guide for Oracle. The definition of accuracy and scale is quite confusing. The book says:

number(6,3) Oracle allows for 2 not 6 significant digitalis. 

My problem is that 6 means accuracy. which means the number of significant digits. therefore, it must accept 6 significant digits. why does the book say it's 2 significant numbers

The book I am referring to, Oracle Database 11g Beginner's Guide by McGraw Hill Professional, December 18, 2008 , p. 12

+6
source share
1 answer

Check out the online Oracle doc :

p is the precision or maximum number of significant decimal places of the digit, where the most significant digit is the leftmost nonzero value of the digit, and the smallest significant digit is the most famous digit. Oracle guarantees number portability with an accuracy of 20 basic 100 digits, equivalent to 39 or 40 decimal places, depending on the position of the decimal point.

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

A positive scale is the number of significant digits to the right of the decimal point with the smallest significant digit.

A negative scale is the number of significant digits to the left of the decimal point, but not including the least significant digit. For a negative scale, the smallest significant digit is on the left side of the decimal point, since the actual data is rounded to the indicated number of places to the left of the decimal point. For example, specification (10, -2) means rounding to hundreds.

+5
source

Source: https://habr.com/ru/post/916139/


All Articles