The CHAR
and VARCHAR
types are similar, but differ in the way they are stored and retrieved. They also differ in maximum length and in whether trailing spaces are retained.
The CHAR
and VARCHAR
types are declared with a length that indicates the maximum number of characters you want to store. For example, CHAR(20)
can hold up to 20 characters.
The length of a CHAR
column is fixed to the length that you declare when you create the table.
VARCHAR(20)
can also hold up to 20 characters... but if cahracter is less.. it will take less space...
so a needs 3 space (for ram)
b needs 20(for sita)
option 2