ORACLE NUMBERààDí?ê?a
1>.NUMBERààDí???2£o
Oracle number datatype ó?·¨£oNUMBER[(precision [, scale])]
?ò3?£oprecision --> p
scale --> s
NUMBER(p, s)
·??§£o 1 <= p <=38, -84 <= s <= 127
±£′?êy?Y·??§£o-1.0e-130 <= number value < 1.0e+126
±£′??ú?ú?÷?ú2?μ?·??§£o 1 ~ 22 bytes
óDD§?a£o′ó×ó±?μúò???2??a0μ?êy???eμ???êy?£
sμ??é??£o
s > 0
??è·μ?D?êyμ?óò±?s??£?2¢??éá??è??£è?oó?ì?éóDD§??ê?·? <= p?£
s < 0
??è·μ?D?êyμ?×ó±?s??£?2¢??éá??è??£è?oó?ì?éóDD§??ê?·? <= p + |s|?£
s = 0
′?ê±NUMBER±íê???êy?£
eg:
Actual Data Specified As Stored As
----------------------------------------
123.89 NUMBER 123.89
123.89 NUMBER(3) 124
123.89 NUMBER(6,2) 123.89
123.89 NUMBER(6,1) 123.9
123.89 NUMBER(4,2) exceeds precision (óDD§???a5, 5 > 4)
123.89 NUMBER(6,-2) 100
.01234 NUMBER(4,5) .01234 (óDD§???a4)
.00012 NUMBER(4,5) .00012
.000127 NUMBER(4,5) .00013
.0000012 NUMBER(2,7) .0000012
.00000123 NUMBER(2,7) .0000012
1.2e-4 NUMBER(2,5) 0.00012
1.2e-5 NUMBER(2,5) 0.00001
123.2564 NUMBER 123.2564
1234.9876 NUMBER(6,2) 1234.99
12345.12345 NUMBER(6,2) Error (óDD§???a5+2 > 6)
1234.9876 NUMBER(6) 1235 (s??óD±íê?s=0)
12345.345 NUMBER(5,-2) 12300
1234567 NUMBER(5,-2) 1234600
12345678 NUMBER(5,-2) Error (óDD§???a8 > 7)
123456789 NUMBER(5,-4) 123460000
1234567890 NUMBER(5,-4) Error (óDD§???a10 > 9)
12345.58 NUMBER(*, 1) 12345.6
0.1 NUMBER(4,5) Error (0.10000, óDD§???a5 > 4)
相关新闻>>
- 发表评论
-
- 最新评论 更多>>