Reputation: 5823
I have deleted all the data from an existing table and then trying to alter table using the following query in mysql:
ALTER TABLE mytable ADD INDEX (created_on);
but nothing seems to working, it just keep running with out any result.
Upvotes: 1
Views: 30
Reputation: 1269443
Here is a correct way to add an index:
create index idx_mytable_createdon on mytable(created_on);
Upvotes: 1