在oracle pl/sql中有dump的函数:
官方文档的描述是: DUMP
returns a VARCHAR2
value containing the datatype code, length in bytes, and internal representation of expr
..
语法格式是:
DUMP( expression, [return_format], [start_position], [length] )
Value | Explanation |
---|---|
8 | octal notation 八进制 |
10 | decimal notation 十进制 |
16 | hexadecimal notation 十六进制 |
17 | single characters 单个字符 |
10 08 | octal notation with the character set name 八进制符号和字符集名称 |
10 10 | decimal notation with the character set name |
10 16 | hexadecimal notation with the character set name |
10 17 | single characters with the character set name |
sys@LS1>select dump('Good',16) from dual;
DUMP('GOOD',16)
-------------------------
Typ=96 Len=4: 47,6f,6f,64
sys@LS1>select dump('Good',1016) from dual;
DUMP('GOOD',1016)
-----------------------------------------------
Typ=96 Len=4 CharacterSet=ZHS16GBK: 47,6f,6f,64
sys@LS1>select dump('Good',1017) from dual;
DUMP('GOOD',1017)
-------------------------------------------
Typ=96 Len=4 CharacterSet=ZHS16GBK: G,o,o,d