DROP TABLE IF EXISTS `t_spec_group`;
CREATE TABLE `t_spec_group` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
`spg_id` int(10) UNSIGNED NOT NULL COMMENT '品类编号',
`name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '品类名称',
`is_delted` tinyint(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unq_spg_id`(`spg_id`) USING BTREE,
UNIQUE INDEX `unq_name`(`name`) USING BTREE,
INDEX `idx_spg_id`(`spg_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '品类表' ROW_FORMAT = Dynamic;
spg_id 这个字段已经设置了唯一索引,为什么还要给他设置普通索引?