oracle的number型为什么只能显示16位数?我小数点本来后面有10位,现在只能显示5位了
oracle的number型为什么只能显示16位数?我小数点本来后面有10位,现在只能显示5位了...
oracle的number型为什么只能显示16位数?我小数点本来后面有10位,现在只能显示5位了
展开
展开全部
我测试是没问题的:
WOSON at myhome> create table test_number (a number (38,20));
Table created.
WOSON at myhome> insert into test_number values (123456789012345678.90123456789012345678);
1 row created.
WOSON at myhome> select * from test_number;
A
----------
1.2346E+17
1 row selected.
WOSON at myhome> col a format 999999999999999999.99999999999999999999
WOSON at myhome> select * from test_number;
A
----------------------------------------
123456789012345678.90123456789012345678
1 row selected.
WOSON at myhome> commit;
Commit complete.
参考:
NUMBER(p,s)
where:
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.
WOSON at myhome> create table test_number (a number (38,20));
Table created.
WOSON at myhome> insert into test_number values (123456789012345678.90123456789012345678);
1 row created.
WOSON at myhome> select * from test_number;
A
----------
1.2346E+17
1 row selected.
WOSON at myhome> col a format 999999999999999999.99999999999999999999
WOSON at myhome> select * from test_number;
A
----------------------------------------
123456789012345678.90123456789012345678
1 row selected.
WOSON at myhome> commit;
Commit complete.
参考:
NUMBER(p,s)
where:
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.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询