char
MySQL
[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]
A fixed-length string that is always right-padded with spaces to the specified length when stored. M represents the column length in characters. The range of M is 0 to 255. If M is omitted, the length is 1.
PostgreSQL
[NATIONAL] CHAR[(M)] [COLLATE collation_name] 对应 PostgreSQL
char[(M)] [COLLATE collation_name]
varchar
MySQL
[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE collation_name]
A variable-length string. M represents the maximum column length in characters. The range of M is 0 to 65,535.
PostgreSQL
[NATIONAL] VARCHAR(M) [COLLATE collation_name] 对应 PostgreSQL
VARCHAR(M) [COLLATE collation_name]
BINARY CHAR BYTE
MySQL
BINARY(M) , CHAR BYTE
The BINARY type is similar to the CHAR type, but stores bin