In PL/SQL, if we create a variable name with varchar2(100) and then assign a value with length of 50 to the variable, then the total memory used is 100 characters.
but if you declare it as varchar2[4000] or more it will use only the 50 characters.
Does a varchar column always allocate only what you have assigned?
Also, if this is the case, is it a good practice to declare all varchar2 variables to max length as the memory would be dynamically allocated? Please clarify. Thank you