Purpose
DUMP() returns the data type code, length in bytes, and internal representation of a specified expression.
Syntax
DUMP(expr[, return_fmt [, start_position [, length ] ] ])
Parameters
| Parameter | Description |
|---|---|
| expr | The expression for analysis. It can be different types of values. |
| return_fmt | The format of return values. This parameter is optional. Valid values:
|
| start_position | The start position of characters to be returned. This parameter is optional. The default value is 1. |
| length | The length of characters to be returned. This parameter is optional. By default, all characters are returned. |
Return type
If NULL is specified for expr, the function returns NULL. Otherwise, the return type is VARCHAR2.
Examples
The following example returns the data type code, length in bytes, and the internal representation in octal format of the string expression OceanBase.
obclient> SELECT DUMP('OceanBase',8) FROM DUAL;
+---------------------------------------------------+
| DUMP('OCEANBASE',8) |
+---------------------------------------------------+
| Typ=23 Len=9: 117,143,145,141,156,102,141,163,145 |
+---------------------------------------------------+
1 row in set