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
Write a command to view mysql database table structure?
How would concatenate strings in mysql?
What is data in mysql?
How do I disable mysql?
What is meant by sharding?
How to see table's field formats or description of table .
Which software is used for mysql?
Is mysql running ubuntu?
What are the differences between char and nchar?
Why mongodb is faster than mysql?
How do you stop an access query?
What is the latest mysql version?
What is a tinyint in mysql?
How to enter Characters as HEX Numbers?
What are the ways in which you can retrieve data in the result set of mysql using php?