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 |
What are triggers and its uses?
What is a sql trace file?
What is a native sql query?
can i call procedure in package
display your age in months?
What is cursor status?
Does view store data in sql?
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 ?
Is null operator in sql?
How to use sql statements in pl/sql?
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.
What does count (*) mean?