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 |
Which type of cursor is used to execute the dml statement?
What is restrict in sql?
If 100 tables are there in user_tables.I want to find in which table zero records are there with table name.Is it possible?
Enlist the data types that can be used in pl/sql?
can i write pl/sql code in a package
What is rownum?
What is rollback?
How to make a copy values from one column to another in sql?
What are the types of optimization?
Define a temp table?
scope of exception handling in plsql
Why do we need cursors in pl sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)