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

What is heap table?

0 Answers  


What is difference between statement and preparedstatement?

0 Answers  


What does mysql workbench do?

0 Answers  


How do I view mysql logs?

0 Answers  


What is identity in mysql?

0 Answers  






What is difference between schema and table?

0 Answers  


Why use stored procedures in mysql?

0 Answers  


How to check server status with 'mysqladmin'?

0 Answers  


How do I copy a table in mysql?

0 Answers  


Does mysql use sql?

0 Answers  


Can't connect mysql server on localhost?

0 Answers  


How to enter Characters as HEX Numbers?

0 Answers  


Categories