示例
mysql> Create Table Employees(FirstName CHAR(10), LastName VARCHAR(10)); Query OK, 0 rows affected (0.64 sec) mysql> Desc Employees; +-----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+-------------+------+-----+---------+-------+ | FirstName | char(10) | YES | | NULL | | | LastName | varchar(10) | YES | | NULL | | +-----------+-------------+------+-----+---------+-------+ 2 rows in set (0.03 sec)
以上就是如何在同一个 MySQL 表中存储固定长度字符串和可变长度字符串?的详细内容。