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
Why do we need cursors in pl sql?
What are the different types of dbmss?
What is the use of desc in sql?
How do you select unique values in sql?
what is rollback? : Sql dba
How does one use sql*loader to load images, sound clips and documents? : aql loader
What is left join in sql?
what are the different type of normalization? : Sql dba
What is the difference between nvl function, ifnull function, and isnull function?
What is pragma in sql?
Can you have more than one key in a database?
What are the types of triggers in sql?
Why is stored procedure faster than query?
What is coalesce sql?
What does (+) mean in sql joins?