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

What is cursor in pl sql with examples?

0 Answers  


How does a covering index work?

0 Answers  


what are enums used for in mysql? : Sql dba

0 Answers  


Is primary key is clustered index?

0 Answers  


What is the use of primary key?

0 Answers  






Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?

0 Answers  


What is dbo in sql?

0 Answers  


Why we use stored procedure instead of query?

0 Answers  


Give the structure of the function ?

2 Answers  


What is a primary key sql?

0 Answers  


Does oracle use sql?

0 Answers  


What is a unique key?

0 Answers  


Categories