Purpose
This function 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 returned 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 data type
If NULL is specified for expr, NULL is returned. Otherwise, a VARCHAR2 value is returned.
Examples
Return 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