String data types can hold plain text and binary data. This section walks you through the different string data types in MySQL. This section also shows you the differences between Oracle, PostgreSQL, and SQL Server string data types.
Understanding string data types
String data types in MySQL
Let's discuss the string data types in MySQL:
- CHAR: It is a fixed-length string, which can contain letters, numbers, and special characters. This type is blank-padded and contains trailing blanks in the field. This field can range from 0 to 255, and the default (if nothing is specified, that is, just using CHAR instead of CHAR(10)) is 1. The size in parenthesis denotes the maximum length of the char specified by the user when creating...