What is the difference between accuracy and scale?

What is the difference between accuracy and scale in Oracle? In textbooks, they usually leave the scale blank and set the accuracy to 6 when creating the primary key.

What do precision and scale mean?

+123
types oracle
Apr 16 '11 at 20:24
source share
7 answers

Accuracy 4, Scale 2: 99.99

Accuracy 10, scale 0: 9999999999

Accuracy 8, Scale 3: 99999.999

Accuracy 5, scale -3: 99999000

+181
Oct 25
source share

Accuracy is the number of significant digits. Oracle guarantees number portability with an accuracy of 1 to 38.

A scale is the number of digits on the right (positive) or left (negative) of the decimal point. The scale can vary from -84 to 127.

In your case, an identifier with an accuracy of 6 means that it will not accept a number with 7 or more significant digits.

Link:

http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/datatype.htm#CNCPT1832

There are also several examples on this page to help you understand accuracy and scale.

+55
Apr 16 2018-11-11T00:
source share

Accuracy is the total number of digits. Scale is the number of digits after the decimal point.

Example:
NUMBER (7.5): 12.12345
NUMBER (5.0): 12345

+51
Jun 11 '13 at 11:25
source share

Maybe more clearly:

Please note that accuracy is the total number of digits, including scale.

NUMBER (accuracy, scale)

Accuracy 8, Scale 3: 87654.321

Accuracy 5, Scale 3: 54.321

Accuracy 5, scale 1: 5432.1

Accuracy 5, scale 0: 54321

Accuracy 5, scale -1: 54320

Accuracy 5, scale -3: 54000

+29
Jul 05 '16 at 8:30
source share

Scale is the number after the decimal point (or a colon, depending on your locale)

Accuracy is the total number of significant digits.

scale VS precision

+7
Jan 09 '19 at 16:51
source share

Accuracy: this is the total number of digits before or after the radius point. Example: 123.456, here the accuracy is 6.

Scale: This is the total number of digits after the radius point. Example: 123.456 here Scaleis 3

+1
Dec 17 '18 at 7:18
source share

If the value is 9999,988 and Precision 4, scale 2, then this means 9999 (it represents accuracy) .99 (scale is 2, so .988 is rounded to 0.99)

If the value is 9999.9887, and the accuracy is 4, the scale is 2, then this means 9999.99

-5
May 15 '13 at 12:38
source share



All Articles