Difference between CHAR and VARCHAR?



Difference between CHAR and VARCHAR?..

Answer / Mithilesh Kumar Pandey

In MySQL, the main difference between CHAR and VARCHAR is that CHAR uses a fixed length for storing data, while VARCHAR uses variable length. For example, if you create a CHAR column with a length of 10, it will always take up 10 bytes, even if you store a smaller value. On the other hand, VARCHAR only takes as many bytes as necessary to store the data.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What is mysql procedure?

1 Answers  


What is view? How can you create and drop view in mysql?

1 Answers  


Write a query to find duplicate rows in table?

1 Answers  


How does limit work in mysql?

1 Answers  


How will you export tables as an xml file in mysql?

1 Answers  


Is mysqli faster than mysql?

1 Answers  


How to extract a unit value from a date and time?

1 Answers  


What is acid in mysql?

1 Answers  


List data types in mysql? Explain

1 Answers  


What does do in mysql?

1 Answers  


How to present a past time in hours, minutes and seconds?

1 Answers  


Where is the mysql config file?

1 Answers  


Categories