From: Date: December 22 2005 3:19am Subject: RE: Are primary keys essential? List-Archive: http://lists.mysql.com/mysql/193152 Message-Id: <2E5067E0651BCD4FB7133D3F8B854FEB09B777@NWIEXC01.asiapacific.cpqcorp.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi James, Not AFAIK, one can create tables without specifying a PK and there is no objection. Data is stored quite happily and you should be able to use your FK's to access other data. It must be voluntary because the ALTER TABLE DML statement has DROP PRIMARY KEY drops the primary index. Note: In older versions of MySQL, if no primary index existed, then DROP PRIMARY KEY would drop the first UNIQUE index in the table. This is not the case in MySQL 5.0, where trying to use DROP PRIMARY KEY on a table with no primary key will give rise to an error.=20 Regards David Logan=20 Database Administrator=20 HP Managed Services=20 148 Frome Street,=20 Adelaide 5000=20 Australia=20 +61 8 8408 4273 - Work=20 +61 417 268 665 - Mobile=20 +61 8 8408 4259 - Fax=20 -----Original Message----- From: James Harvard [mailto:james.lists.tech@stripped]=20 Sent: Thursday, 22 December 2005 12:45 PM To: mysql@stripped Subject: Re: Are primary keys essential? In hindsight my thread title was misleading - sorry. Should have been "are primary keys _always_ essential?". JH --=20 MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: = http://lists.mysql.com/mysql?unsub=3Ddavid.logan@stripped