From: Michael Widenius Date: April 12 1999 8:08am Subject: Error 1022 List-Archive: http://lists.mysql.com/mysql/1688 Message-Id: <14097.43356.707718.622501@monty.pp.sci.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit >>>>> "Robert" == Robert Pruitt writes: Robert> Hi! Robert> I looked through the manual , but came up short. Robert> Here's my problem -- I deleted a primary key. Later, I want to Robert> reinitiate it. But, I get this error -- ERROR 1022: Can't write, Robert> duplicate key in table 'A-cb' Robert> I don't mean to bug the list with a beginner problem -- on the other Robert> hand, I'm still stumped.... Hi! Please repost with mysqlbug script + a full example of your problem, including a full test that also shows any possible error messages. We need more information about your MySQL version and OS to be able to help you. You can find information how to do a correct bug report at: http://www.tcx.se/Manual_chapter/manual_Questions.html#Asking_questions PLEASE read the above before reposting your question, this will save us all a lot of time! Sorry for the short answer, but as we get a couple of hundred mails/day we don't have time to answer questions that are already documented or doesn't contain all information needed to give a quick exact answer. Yours, Monty *************** Warning commercial signature follows ********** If you like TCX's concept of a 'mostly free' database and free advice, you should at least CONSIDER supporting us that we can afford to keep this service up. http://www.tcx.se/ PS: If the above happens with ALTER TABLE, you can find the duplicate key with: SELECT key_colum,count(*) as cnt from table_name GROUP BY key_column having cnt>1;