say, I have a table TABLE(col1,col2,col3)
and, I want create a index INDEX(col1=table.col1+table.col2)
say, I have a table TABLE(col1,col2,col3)
and, I want create a index INDEX(col1=table.col1+table.col2)
create table myTable
(
pk int(11) not null,
col1 varchar(100),
col2 varchar(100),
col3 varchar(100),
key idx_combo (col1, col2) <== define index here
) engine=innodb;
or something like that. Documentation is here: