当所有的列都是定长时,仅有一个时不定长列时
可以把不定长转换为定长。
空间换时间 空间<——>时间
代码:
mysql> create table member (
-> id int unsigned auto_increment primary key,
-> username char(20) not null default '',
-> gender char(1) not null default '',
-> weight tinyint unsigned not null default 0,
-> birth date not null default '0000-00-00',
-> salary decimal(8,2) not null default 0.00,
-> lastlogin int unsigned not null default 0
-> )engine myisam charset utf8;