- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2013-1-17 14:48:44
SQL>
SQL> create table mac(t1 int);
Table created.
SQL> insert into mac values(1);
1 row created.
SQL> insert into mac values(10);
1 row created.
SQL> insert into mac values(100);
1 row created.
SQL> insert into mac values(1200);
1 row created.
SQL> insert into mac values(0.1);
1 row created.
SQL> insert into mac values(0.01);
1 row created.
SQL> insert into mac values(0.001);
1 row created.
SQL> insert into mac values(0.0012);
1 row created.
SQL> commit;
Commit complete.
select t1,dump(t1),substr(dump(t1,16),13,6) HEX from mac;
1* select t1,dump(t1),substr(dump(t1,16),13,6) HEX from mac
SQL> /
T1 DUMP(T1) HEX
---------- -------------------- ------------------------
1 Typ=2 Len=2: 193,2 c1,2
10 Typ=2 Len=2: 193,11 c1,b
100 Typ=2 Len=2: 194,2 c2,2
1200 Typ=2 Len=2: 194,13 c2,d
0 Typ=2 Len=1: 128 80
0 Typ=2 Len=1: 128 80
0 Typ=2 Len=1: 128 80
0 Typ=2 Len=1: 128 80
SQL> select dump(123456.789,16) from dual;
DUMP(123456.789,16)
-----------------------------
Typ=2 Len=6: c3,d,23,39,4f,5b
0xc3=195(十进制)-193=2 ==》2后面100^2
oxd=13-1= 12 => 12 * 100^2=120000
0x23=35-1=34=> 34*100^1=3400
0x39= 57-1=56 * 100^0=56
0x4f=79-1=78 * 100^-1=0.78
0x5b=91-1=90*100^-2=0.009
以上加起来为 123456.789
|
|