ALTER TABLE `table`
MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
ALTER TABLE `table`
ADD PRIMARY KEY (`id`);
ALTER TABLE `table`
MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;
ALTER TABLE `table`
ADD PRIMARY KEY (`id`);