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


Please Help Members By Posting Answers For Below Questions

What are analytic functions in sql?

552


What is varray in pl sql?

566


What are sql procedures?

584


What is the mutating table and constraining table?

563


What is Collation Sensitivity ? What are the various type ?

501






Is nosql relational?

549


Define commit, rollback and savepoint?

580


How is data stored in sql?

551


What is sp_helptext?

592


how to install mysql? : Sql dba

580


Which is better trigger or stored procedure?

502


What is form and report?

519


What is a .db file?

544


What is column?

554


How do I run sql?

622