May 2020
Beginner
564 pages
14h 9m
English
The following table lists the string data types available in MySQL. When the syntax shown in the following table includes square brackets ([]), this indicates an optional part of the syntax. For example, in CHAR[(size)], the square brackets indicate that the size is optional:
| Data Type | Description | Storage Used |
| CHAR[(size)] | Fixed-length string with size from 0-255 allowed; default of 1 if size not specified | Size in bytes |
| VARCHAR(size) | Variable-length string with size from 0-65535 allowed | Length of string + 1 byte if less than 255 bytes + 2 bytes if greater than 255 bytes |
| BINARY[(size)] | Binary fixed-length string with size from 0-255 allowed; default of 1 if size not specified | Size in bytes |
Read now
Unlock full access