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 a query in mysql?
What is the password of mysql?
What is difference between mysql and mysql server?
How do I create a stored procedure in mysql?
What are the steps involved in query processing?
What are the limitations of mysql?
Is blocked because of many connection errors mysql?
what is a cursor? : Mysql dba
How we can see all indexes defined for a table in mysql?
How to allow the user "sonia" to connect to the server from localhost using the password "passwd". Login as root. Switch to the mysql db. Give privs. Update privs.
What are the differences between binary and varbinary?
What is mysql server used for?
How show all tables in mysql query?
Where is the mysql database stored?
Do I need to pay for mysql?