What is difference between CHAR and VARCHAR2?What is the
maximum SIZE allowed for each type?
Answer Posted / sravanthi
Let us declare to variables as below:
v_empname CHAR2(10) := 'BILL';
v_depname VARCHAR2(10) := 'HRD';
the database allocates 10 bytes memory for v_empname and
just 3 bytes memory for v_deptname.
when a variable is declared varchar then the memory will be
allocated variably.
So,if one is not sure of the data that the variable is
going to hold then VARCHAR2 should be used instead of CHAR
during declaration.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
How do you update a value in sql?
What are different types of statements supported by sql?
Can a view be mutating? If yes, then how?
How delete a row in sql?
Explain polymorphism in pl/sql.
What is trigger in pl sql with examples?
What is embedded sql with example?
How do I add a database to sql?
who introduced sql?
How to return an array from java to pl/sql?
what are the limitations of mysql in comparison of oracle? Mysql vs. Oracle. : Sql dba
What are the steps for performance tuning.
How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?
Why do we use procedures?
what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba