What is the difference between char and varchar data types?
Answer Posted / paras nath
The char is a fixed-length character data type, the varchar is a variable-length character data type.
Because char is a fixed-length data type, the storage size of the char value is equal to the maximum size for this column. Because varchar is a variable-length data type, the storage size of the varchar value is the actual length of the data entered, not the maximum size for this column.
You can use char when the data entries in a column are expected to be the same size.
You can use varchar when the data entries in a column are expected to vary considerably in size.
| Is This Answer Correct ? | 53 Yes | 7 No |
Post New Answer View All Answers
What is the hostname for mysql database?
What is the password of mysql?
Explain the difference between procedure and function in mysql?
How to create a table?
What does "i_am_a_dummy flag" do in mysql?
How to store binary data in mysql?
Is mysql a backend?
How do you rename a procedure in mysql?
Is mysqli secure?
How do I uninstall mysql connector?
What are mysql functions?
How is myisam table stored?
What is procedure in mysql?
How to get help information from the server?
How triggers can be used in mysql?