# Fixed-Length And Variable-Length String
__*CHAR data type*__
__*VARCHAR DATA TYPE*__
+ Data Type:
  + **`CHAR`**: Fixed-length string
  + **`VARCHAR`**: Variable-length string
+ **`CHAR`** example:
  + Column `LANGUAGE_CODE` with 2 characters: **`language_code CHAR(2)`** 
+ **`VARCHAR`** example:
  + Column `PLANET_NAME` with maximum 45 characters: **`planet_name VARCHAR(45)`** 

------------------------------------------------------------
CHAR is a fixed-length string. Different from the VARCHAR type, when data is inserted into a CHAR column, the trailing spaces are truncated. M ranges from 0 to 255.

VARCHAR is a variable length string. M represents the maximum column length in characters (not bytes). The maximum size of a VARCHAR cannot exceed 65,535 bytes. The maximum line length and the character set used determine the length of the VARCHAR.

Value range for the maximum column length of VARCHAR in bytes of a single character in the character set
ascii 1 (0, 65535]
latin1 1 (0, 65535]
binary 1 (0, 65535]
utf8 3 (0, 21845]
utf8mb4 4 (0, 16383]

