What is the difference between char and varchar data types?
Answer Posted / dinesh goyal
char is used for fixed length memory storage whereas varchar
is used for variable lenght memory storage.
Fox Example if we have char(10) then we can store 10 bit
value in it but if we store only 6 bit value in it then rest
of the 4 bit space is goes wasted. this limitation is
overcome by varchar.
In varchar if we use less space than define space the rest
of space is not wasted.
| Is This Answer Correct ? | 363 Yes | 24 No |
Post New Answer View All Answers
How to see the create table statement of an existing table?
how to dump all databases for backup. Backup file is sql commands to recreate all db's.
Is mysql from oracle?
What is new mysqli?
How do I declare a variable in mysql?
Is number a datatype in mysql?
Is mysql distributed?
How do you select a table?
What is sqlyog?
What are the differences between a primary key and foreign key?
Write a command with which mysql table can be repaired
How to delete an existing column in a table?
What is the use of mysql_fetch_array () function in php?
How do you know if your mysql server is alive?
What is mysql aggregate functions? Explain