In my table I have a multi-column index for the columns (name,folder)
I recently added a new column called date and I want to put an index into it, but I want to put it into the existing multi-column index
When I do
Alter table books add index theindex (date);
Duplicate key name 'theindex'
Just change the syntax to the below way to add new columns to the index:
ALTER table `books` DROP INDEX theindex; ALTER table `books` ADD INDEX theindex (`date`, `time`);