Here is an example of readding a PRIMARY KEY with an AUTO_INCREMENT field:
[b:40986c2a8b]First make the field NOT NULL[/b:40986c2a8b]
[code:1:40986c2a8b]
ALTER TABLE tableName MODIFY FieldNAME INT(18) NOT NULL;
[/code:1:40986c2a8b]
[b:40986c2a8b]Create The Primary Key[/b:40986c2a8b]
[code:1:40986c2a8b]ALTER TABLE tableName ADD CONSTRAINT PRIMARY KEY(FieldName);[/code:1:40986c2a8b]
[b:40986c2a8b]ADD AUTO_INCREMENT (if you want auto_increment)[/b:40986c2a8b]
[quote:40986c2a8b]ALTER TABLE tableName MODIFY FieldNAME INT(18) NOT NULL AUTO_INCREMENT;[/quote:40986c2a8b]
If there is an easier way then this then please let me know :)
primary, tableadd, tablehere, readding, auto_increment, null, alter, tablename, modify, fieldname, int, constraint,