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 are triggers and its uses?

0 Answers  


What is a sql trace file?

0 Answers  


What is a native sql query?

0 Answers  


can i call procedure in package

3 Answers   TCS,


display your age in months?

2 Answers  






What is cursor status?

0 Answers  


Does view store data in sql?

0 Answers  


declare l1 number := null; l2 number :=null; begin if l1=l2 then message('equal'); else if l1<>l2 then message('not equal'); else message('else'); end if; end if; end; What will be the output ?

7 Answers   Oracle,


Is null operator in sql?

0 Answers  


How to use sql statements in pl/sql?

0 Answers  


Given two tables Student(SID, Name, Course) and Level(SID, level) write the SQL statement to get the name and SID of the student who are taking course = 3 and at freshman level.

9 Answers   Oracle,


What does count (*) mean?

0 Answers  


Categories