oracle的number型为什么只能显示16位数?我小数点本来后面有10位,现在只能显示5位了

oracle的number型为什么只能显示16位数?我小数点本来后面有10位,现在只能显示5位了... oracle的number型为什么只能显示16位数?我小数点本来后面有10位,现在只能显示5位了 展开
 我来答
wuyu_woson
2007-11-09 · 超过22用户采纳过TA的回答
知道答主
回答量:44
采纳率:0%
帮助的人:67.8万
展开全部
我测试是没问题的:

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.
badkano
2007-11-09 · 知道合伙人体育行家
badkano
知道合伙人体育行家
采纳数:144777 获赞数:885365
团长

向TA提问 私信TA
展开全部
number(16,10)代表整数位10,小数位10位,你
desc 表名
看一下你字段是否符合
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式