文章目录
MySQL之MyIsam索引
1.MyIsam索引介绍
2.演示(单列主键索引、等值查询、范围查询)
CREATE TABLE `user`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) DEFAULT NULL,
`age` int(11) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_age` (`age`) USING BTREE
) ENGINE = MyISAM
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8;
select * from user where id = 28;
select * from user where id between 28 and 47;