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 to use rank function in mysql?
how to Return total number of rows.
Is mysql server free?
Can I copy mysql data directory?
Which is best pdo or mysqli?
What is a definer?
Why use stored procedures in mysql?
What are aggregate functions in mysql?
How to create a test table in your mysql server?
How do I declare a variable in mysql?
How do I download mysql?
Is blocked because of many connection errors unblock with mysqladmin flush hosts?
How do I check mysql version?
What is the difference between mysql_connect and mysqli_connect?
Is mysql a relational database?