What is the difference between CHAR and VARCHAR data types?

Answers were Sorted based on User's Feedback



What is the difference between CHAR and VARCHAR data types?..

Answer / rajan vardawaj

CHAR is a fixed length data type. CHAR(n) will take n
characters of storage even if you enter less than n
characters to that column. For example, “Hello!”

will be stored as “Hello! ” in CHAR(10) column. VARCHAR is a
variable length data type. VARCHAR(n) will take only the
required storage for the actual number

of [...]

Is This Answer Correct ?    27 Yes 2 No

What is the difference between CHAR and VARCHAR data types?..

Answer / shekoli

Char is a fixed lenth datatype. Ex: char(7), welcome

but varchar is a variable length datatypes, Ex:
varchar(7),welcome (or) come

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More MySQL Interview Questions

Explain GRANT command in MySQL.

1 Answers  


What is a deterministic function?

0 Answers  


What is the innodb in mysql?

0 Answers  


What storage engines are used in MySQL?

0 Answers  


Difference between MYSQL_ASSOC,MYSQL_NUM and MYSQL_BOTH ?

3 Answers   TCS,






What are the advantages of a procedure?

0 Answers  


What is ISAM?

0 Answers  


What is blob and text in mysql?

0 Answers  


What is mysql common?

0 Answers  


What is mysql community edition?

0 Answers  


What is limit in mysql?

0 Answers  


How many columns is too many mysql?

0 Answers  


Categories