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
What do you mean by query optimization?
Why we use cross join?
Why do we use joins?
how can we destroy the session, how can we unset the variable of a session? : Sql dba
what is an extent ? : Sql dba
Explain what is table in a database?
When to use inner join and left join?
What is a mutating table and a constraining table?
What is the difference between unique and primary key constraints?
What is sql keyword?
What are the set operators in sql?
What are tables and fields?
what is commit? : Sql dba
What are the two types of periodical indexes?
explain the difference between myisam static and myisam dynamic. : Sql dba