PL/SQL allocates memory for the variable's at runtime or at
compile time

Answers were Sorted based on User's Feedback



PL/SQL allocates memory for the variable's at runtime or at compile time..

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

PL/SQL allocates memory for the variable's at runtime or at compile time..

Answer / masthan

runtime only

Is This Answer Correct ?    2 Yes 1 No

PL/SQL allocates memory for the variable's at runtime or at compile time..

Answer / jagadeesh

compile time enough for memory allocation

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More SQL PLSQL Interview Questions

Types of locks in database ?

8 Answers   HCL, TCS, Tieto,


What are two statement types in sql?

0 Answers  


What are the operators in sql?

0 Answers  


What are the limitations of sql express?

0 Answers  


Can we insert data into materialized view?

0 Answers  






Can function return multiple values in sql?

0 Answers  


why not null constraint showing its constraint type as 'c'

1 Answers  


Where is all the data on the internet stored?

0 Answers  


What is a call statement? Explain with an example.

0 Answers  


What are the advantages of indexing?

0 Answers  


What is extent clause in table space?

1 Answers   TCS,


Explain the the delete statements in sql?

0 Answers  


Categories