1. 程式人生 > >關於oracle中的數字類型

關於oracle中的數字類型

guarantee The eas sca ora osi specified numbers 其中

1.關於number類型。

以下是從其文檔中摘錄出的一句話:

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.

其中20 base-100 digits有些難理解,查了一下發現是百進制的20個數字,換算成10進制也就是10進制的40個數字。

關於oracle中的數字類型