To add a index key table to existing sql table run

ALTER TABLE tablename ADD id MEDIUMINT NOT NULL AUTO_INCREMENT KEY