dump函数

来源:互联网 发布:mysql exist的用法 编辑:程序博客网 时间:2024/04/30 15:50

在oracle pl/sql中有dump的函数:

官方文档的描述是: DUMP returns a VARCHAR2 value containing the datatype code, length in bytes, and internal representation ofexpr..

语法格式是:

DUMP( expression, [return_format], [start_position], [length] )

ValueExplanation8octal notation                                                                     八进制10decimal notation                                                               十进制16hexadecimal notation                                                       十六进制17single characters                                                               单个字符10 08octal notation with the character set name                    八进制符号和字符集名称10 10decimal notation with the character set name10 16hexadecimal notation with the character set name10 17single 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


0 0
原创粉丝点击