oracle dump 函式

哎呀我的天吶發表於2015-02-11
select dump('abcd'||chr(10)||chr(13),10) from dual


-- 查詢結果:
Typ=1 Len=6: 97,98,99,100,10,13


-- 結果說明Type 
1=Varchar2
2=Number
12=Date
96=Char
等等


-- 結果說明Len:表示佔用的位元組數


-- 後面一串值,簡單說就是ASC碼
select dump('a-?5') from dual
Typ=96 Len=4: 97,45,63,53


select chr(97), chr(61), chr(63), chr(65) from dual
a = ? A


select ascii('a'), ascii('-'), ascii('?'), ascii('5') from dual
97 45 63 53

11:51:55 SQL> select dump(to_date('2014-01-01 12:00:00','yyyy-mm-dd hh24:mi:ss')),dump('2014-01-01 12:00:00') from dual;

DUMP(TO_DATE('2014-01-0112:00:00 DUMP('2014-01-0112:00:00')
-------------------------------- -----------------------------------------------------------------------
Typ=13 Len=8: 222,7,1,1,12,0,0,0 Typ=96 Len=19: 50,48,49,52,45,48,49,45,48,49,32,49,50,58,48,48,58,48,48

Elapsed: 00:00:00.00


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29990276/viewspace-1433288/,如需轉載,請註明出處,否則將追究法律責任。

相關文章