VSIZE
VSIZE is a SQL function that provides the number of bytes used by the internal representation of the argument. It measures the space that would be used to store the data object not including any explained overhead for the data type or the database storing the data. The VSIZE function can be used on different data types including string, numeric, and date data types.
VSIZE(item)
- item: The data item which you want to evaluate for size. This could be a varray, nested table, or any other type of data type that you want to determine the size of, including both built-in and user-defined types.
Example
Output
Explanation
The VSIZE() function in Oracle SQL returns the number of bytes that a value is using. In the example, it returns the byte size of the string ‘Oracle’ which is 6 bytes. Each character in the string is stored using one byte, hence the size is 6.