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 execution plan in sql?

1024


What is the difference between a primary key and a clustered index?

973


What is data type in sql?

941


What is sql table?

952


What is sqlite used for?

982


Is oracle and sql same?

995


How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?

1428


explain the advantages and disadvantages of stored procedure? : Sql dba

992


How can a function retun more than one value in oracle with proper example?

1061


how to convert character strings to numeric values? : Sql dba

1084


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

1054


What is the best free sql database?

1043


What does 0 mean in sql?

954


What is the difference between database trigger and stored procedure?

1060


define join and explain different type of joins? : Sql dba

936