What is the difference between char and varchar data types?
Answer Posted / preeti singh
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 ? | 90 Yes | 7 No |
Post New Answer View All Answers
How can we encrypt and decrypt a data presented in a table using mysql?
Can we rename database in mysql?
What is strict mode in mysql?
What is a delimiter in mysql?
What is a heap table?
How many types of indexes are there in mysql?
What sql does mysql use?
What is triggers?
Where is mysql data stored linux?
Write a query to select all teams that won either 1, 3, 5 or 7 games.
What is mysql routine?
What is the difference between database and table?
What is latest version of mysql?
How we get sum of column.
How can I create table in mysql?