MySQL Forums
Forum List  »  Newbie

Error 1075 when dropping primary index
Posted by: Wim Roffel
Date: December 10, 2022 02:21PM

When I try to drop the primary index of a table like

ALTER TABLE `mytable` DROP PRIMARY KEY

I get the error:

MySQL error 1075: Incorrect table definition; there can be only one auto column and it must be defined as a key

I tried to search the internet. It seems to be related to the fact that the field is an AUTO_INCREMENT field. But it evades me why this is relevant. And I would like to find a way to drop the key anyway.

Options: ReplyQuote


Subject
Written By
Posted
Error 1075 when dropping primary index
December 10, 2022 02:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.