Top Banner
Oracle 数数数数 数数数 Alibaba-inc 2010-05 http://blog.csdn.net/yzsind
32

Oracle 数据类型

May 31, 2015

Download

Technology

yzsind

Oracle 数据类型分享
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 1. Oracle

    Alibaba-inc
    2010-05
    http://blog.csdn.net/yzsind

2.
(NUMBER)
(STRING)
(DATETIME)
(LOB)
3.
NUMBER(p,s)
p:+ 1-38
s:-47-127
Number(6,2)6422
Number(6,-2)???
Number(1,-2)??? 949,950
DATA_LENGTH===22???
4. Number
1-21
01(0x80)
12(0xC1,0x02)
-13(0x3E,0x64,0x66)
SQL> select dump(123456789,16) from dual;
DUMP(123456789,16)
-----------------------------
Typ=2 Len=6: c5,2,18,2e,44,5a
5. unDumpNumber
if Bytes(0) = 128 then --1280
result := 0;
elsif Bytes(0) > 128 then --128
for i in 1 .. vlength - 1 loop
result := result +
(Bytes(i) - 1) * power(100, (Bytes(0) - 193) - i+1);
end loop;
else --128
for i in 1 .. vlength - 2 loop --102
result := result +
(Bytes(i) - 101) * power(100, (62 - Bytes(0)) - i+1);
end loop;
end if;
return(Result);
6. (10g)
BINARY_FLOAT
4
BINARY_DOUBLE
8

7. Number VS Binary_Float
insert into t(c_number,c_float) select rownum/100,rownum/100 from dual connect by rownum