PLSQL | VSIZE Function
The PLSQL VSIZE function is used for returning the number of bytes in the internal representation of an expression. The PLSQL accepts only one parameter which specifies the expression.
Generally, the VSIZE function returns a numeric value but if the expression is Null then this function returns null. This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion.
Syntax:
VSIZE( expression )
Parameters Used:
expression – It is used to specify the string which needs to be evaluated.
Supported Versions of Oracle/PLSQL:
- Oracle 12c
- Oracle 11g
- Oracle 10g
- Oracle 9i
- Oracle 8i
Return Value:
The VSIZE function in PLSQL returns a numeric value.
Example-1: Passing an input string with only characters.
DECLARE Test_String string(20) := 'Geeksforgeeks'; BEGIN dbms_output.put_line(VSIZE(Test_String)); END;
Output:
13
Example-2: Passing an input string with characters and blank spaces.
DECLARE Test_String string(20) := ' Geeksforgeeks '; BEGIN dbms_output.put_line(VSIZE(Test_String)); END;
Output:
15
Example-3: Passing a NULL argument.
DECLARE Test_String string(20) := ''; BEGIN dbms_output.put_line(VSIZE(Test_String)); END;
Output:
NULL
Example-4: Passing blank space as an argument.
DECLARE Test_String string(20) := ' '; BEGIN dbms_output.put_line(VSIZE(Test_String)); END;
Output:
1
Recommended Posts:
- PLSQL | LOG Function
- PLSQL | LEAST Function
- PLSQL | CHR Function
- PLSQL | MOD Function
- PLSQL | EXP Function
- PLSQL | LN Function
- PLSQL | ABS Function
- PLSQL | COS Function
- PLSQL | TAN Function
- PLSQL | SIN Function
- PLSQL | FLOOR Function
- PLSQL | ASCII Function
- PLSQL | ASIN Function
- PLSQL | CURRENT_TIMESTAMP Function
- PLSQL | UPPER Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



