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

How do I disconnect mysql workbench?

0 Answers  


How do you convert to a different table type?

1 Answers  


How to decrement dates by 1 in mysql?

0 Answers  


How do I start and stop mysql server?

0 Answers  


What is clob in mysql

0 Answers  






Is there a way to see the files which are stored?

0 Answers  


What are the difference between and myisam and innodb?

0 Answers  


Why do we use views instead of tables?

0 Answers  


How to store values to array from mysql database in php?

0 Answers  


How do I restore a mysql database?

0 Answers  


What is bdb (berkeleydb)?

0 Answers  


What is unsigned in mysql?

0 Answers  


Categories