Purpose
This function returns the data type code, byte length, and internal representation of the specified expression.
Syntax
DUMP(expr[, return_fmt [, start_position [, length ] ] ])
Parameters
Parameter |
Description |
|---|---|
| expr | The expression to be analyzed. It can be a value of any type. |
| return_fmt | The format of the returned value. Valid values:
|
| start_position | The starting position for returning characters. Default value: 1. |
| length | The number of characters to return. Default value: all characters. |
Return type
If expr is NULL, this function returns NULL. Otherwise, it returns a value of the VARCHAR2 data type.
Examples
Return the data type code, byte length, and octal values of the corresponding characters for the string 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
