建表语句和初始化数据如下:
-- test表a为主键
create table test (
a int not null,
b varchar(50),
c int not null,
primary key(a)
) engine=INNODB;
insert into test values
(1,'a',11),
(2, 'b', 12),
(3, 'c', 13),
(4, 'd', 14);
-- 创建联合索引 bc
ALTER TABLE test ADD index(b,c);