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
Is sql a programming?
What is the purpose of the primary key?
What is a natural join sql?
how many tables will create when we create table, what are they? : Sql dba
What is sql entity?
Can we use views in stored procedure?
What is crud stand for?
How does left join work in sql?
how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba
What are the types of sql commands?
what is sub-query? : Transact sql
what's the difference between a primary key and a unique key? : Sql dba
What is the difference between function and procedure in pl/sql?
What is cost in sql execution plan?
Explain the insert into statements in sql?