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 / satish asnani

Technically CHAR has better performance than VARCHAR2.
For CHAR(10) database already knows the length of value in
each record and therefore displays the entire string up till
10 characters. In case of VARCHAR2 the end of string has to
be reached('\0'-NULL) before the database stops displaying
the characters ahead. Each character is compared to NULL
character before it can be determined that end of string has
arrived. Comparing each string character with NULL character
consumes some CPU cycles and hence VARCHAR2 is slower in
performance as compared to CHAR.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is time based sql injection?

1033


What is substitution variable in pl sql?

1107


Is ms sql is free?

1080


Can I create table without primary key?

1044


What is difference between mysql and postgresql?

1233


Explain normalization and what are the advantages of it?

998


Can a commit statement be executed as part of a trigger?

1102


How can we link a sql database to an existing android app?

1079


What is online transaction processing (oltp)?

1063


Can we perform dml in function?

1130


What is serial sql?

1040


Can procedure in package be overloaded?

1140


What are two statement types in sql?

1157


explain about mysql and its features. : Sql dba

1052


How to add, remove, modify users using sql?

1089