From: Christian Mack Date: March 23 1999 8:13pm Subject: Re: Duplicate Keys. List-Archive: http://lists.mysql.com/mysql/850 Message-Id: <36F7F5EE.7E8C098@compal.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Robert D. Lang CEO" wrote: > > Dear Mysql Users: I have two primary keys in a mysql table called, " user." > They are for host and user fields. I am having a conflict with regards to > updating due to this. I need to remove one of the primary keys so I do not have > a conflict when writing to the database mysql. > > The error message is: mysql::st execute failed: Can't write, duplicate key in > table 'user. > > I am new to mysql, so I am asking what is the command line needed to remove a > primary key from a field? > > -- > Sincerely, Robert D. Lang Hi Robert Sorry, but this seems nonsens to me. Why do you want to use one 'user name' with the same 'from host' several times? Removing the PRIMARY KEY will only allow you to insert a duplicate, but mysql will never use it, because mysql selects always the first matching entry in the priviledge tables. Note: You can remove a PRIMARY KEY with: ALTER TABLE yourTable DROP PRIMARY KEY Tschau Christian