PL/SQL allocates memory for the variable's at runtime or at
compile time
Answers were Sorted based on User's Feedback
Answer / gaurav
For a CHAR variable, PL/SQL allocates at compile time enough memory for the maximum size.
For a VARCHAR2 variable, memory allocation depends on maximum size:
If the maximum size is less than 4,000 bytes, PL/SQL allocates at compile time enough memory for the maximum size.
If the maximum size is 4,000 bytes or more, PL/SQL allocates at run time enough memory for the actual value.
Thus, PL/SQL optimizes smaller VARCHAR2 variables for performance and larger ones for efficient memory use. ( from oracle doc)
Is This Answer Correct ? | 4 Yes | 0 No |
Types of locks in database ?
What are two statement types in sql?
What are the operators in sql?
What are the limitations of sql express?
Can we insert data into materialized view?
Can function return multiple values in sql?
why not null constraint showing its constraint type as 'c'
Where is all the data on the internet stored?
What is a call statement? Explain with an example.
What are the advantages of indexing?
What is extent clause in table space?
Explain the the delete statements in sql?