Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What does the field length of type number mean in oracle?
What does the field length of type number mean in oracle?
It means that the precision is 38 bits by default, and the range of values is1~ 38; ?

In fact, it is a variable-length type on disk, which will occupy 0~22 bytes of storage space;

The default decimal place is 0.

Digital data type

The syntax of number type is simple: number(p, s):

1.p

Precision bit, precision, is the total number of digits of valid data, with a value range of 38, and the default value is 38, which can be represented by the character *;

2.s

Scale is the number of digits to the right of the decimal point. The range of values is -84~ 127, and the default value depends on p. If p is not specified, then s is the maximum range. If p is specified, S = 0.

P and S of type # have nothing to do with their underlying storage, and have no influence on how data is stored on disk at all, only on which values are allowed and how to round them. You can think that they are "editing" the data.

Simply put, the precision bit p indicates how many significant digits a numerical value can have at most, and the decimal place s indicates how many decimal places it can have at most. In other words, P indicates how many significant digits a * * * has (that is, there are at most p-s significant digits to the left of the decimal point), and S indicates that there are S significant digits to the right of the decimal point.