Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between CHAR and VARCHAR2? If
VARCHAR2 serves the uses of CHAR why CHAR is still used and
not been discarded yet?

Answer Posted / madhavi

Hi,
Char is the datatype that occupies complete space declared
whether used or not. ie:- If any field is declared as char
(10) then this field for all records will occupy complete
10 bytes whether the value stored in it is 1 byte or 10
byte.

Whereas Varchar2, as the first 3 characters explains Var-
Variable, will occupy only the bytes for the value entered
in the field.

So ideally it is good practice to declare fields like
emp_flg or any other fields which we are sure will have
fixed length value as Char.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can the performance of a trigger be improved?

1047


How to handle bulk data?

1311


Can we join 3 tables in sql?

1044


Can we use ddl statements in stored procedure?

1154


In pl/sql, what is bulk binding, and when/how would it help performance?

994


Does mysql support pl sql?

1175


what does the t-sql command ident_incr does? : Transact sql

1078


what is 'mysqladmin' in mysql? : Sql dba

1026


What are the benefits of pl/sql packages?

1107


List and explain the different types of join clauses supported in ansi-standard sql?

1356


what are the authentication modes in sql server? How can it be changed? : Sql dba

1433


How can you tell the difference between an index and a view?

937


How do I filter in sql profiler?

995


What are aggregate and scalar functions?

1025


What are different types of triggers?

1112