CHAR: CHAR, also known as character, stores values in fixed length. If we store a string with a size less than the fixed length, then it is padded with space characters. It uses static memory allocation and can hold a maximum of 255 characters.
VARCHAR: VARCHAR, also known as variable character, stores values in variable length. They are not padded with any character. It uses dynamic memory allocation and can hold a maximum of 65535 characters.
POSTAL_CODE is stored with datatype CHAR because the value of POSTAL_CODE can be large enough, to be stored in INTEGER or SMALLINT. But as we know CHAR can store up to 255 characters, then it does not matter what the value is, because then each digit of POSTAL_CODE is stored as a single character.
Get Answers For Free
Most questions answered within 1 hours.