What is the difference between the data types char and varchar?
a).Nothing, they are essentially the same.
b).Char uses all of the space allocated, whereas varchar uses only as much space as the characters actually stored.
c).Char stores only numeric values, whereas varchar can store any text.
Lalit MPosted Dec 8, 2009, 2:10 AM
Satyanarayan BajoriaPosted Dec 10, 2009, 6:11 AM
The main difference between char and varchar is that char takes the completely memory specify while declaring where as varchar takes the memory only the value assign to it and rest of the memory will be released.
So when we know the size go for char and when we don't know the size go for varchar.