Purpose
The function returns the size in bytes of expr.
Syntax
VSIZE (expr)
Parameters
The expr can be a value or expression of a numeric data type (NUMBER, FLOAT, BINARY_FLOAT, or BINARY_DOUBLE) or a character data type (CHAR, VARCHAR2, NCHAR, or NVARCHAR2).
Return type
Returns a
NUMBERvalue.If
exprisNULL, the function returnsNULL.
Examples
Use the VSIZE function to query the number of bytes of 123456, ABCDEF, and People's Republic of China.
obclient> SELECT VSIZE(123456), VSIZE('ABCDEF'), VSIZE ('People's Republic of China') FROM DUAL;
+---------------+-----------------+--------------------------------+
| VSIZE(123456) | VSIZE('ABCDEF') | VSIZE('People''s Republic of China') |
+---------------+-----------------+--------------------------------+
| 8 | 6 | 21 |
+---------------+-----------------+--------------------------------+
1 row in set