Oracle number数据类型介绍
number类型存储值的范围为1.0 x 10-130 到 1.0 x 10126(不含)。
NUMBER(p,s)
p is the precision, 最大有效的十进制位数,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,指定小数点右边的位数,The scale can range from -84 to 127.如果是负值,比如是-2,相当于round到百分位。
如果s>p,p指的是小数点右边的有效位数,s指的是小数点右边的所有位数。
每个number占用1-22bytes的存储空间。
NUMBER(p,s)
p is the precision, 最大有效的十进制位数,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,指定小数点右边的位数,The scale can range from -84 to 127.如果是负值,比如是-2,相当于round到百分位。
如果s>p,p指的是小数点右边的有效位数,s指的是小数点右边的所有位数。
NUMBER(p)等同于NUMBER(p,0)。