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.
HP Managed Services
148 Frome Street,
+61 8 8408 4273 - Work
+61 417 268 665 - Mobile
+61 8 8408 4259 - Fax
From: James Harvard [mailto:james.lists.tech@stripped]
Sent: Thursday, 22 December 2005 12:45 PM
Subject: Re: Are primary keys essential?
In hindsight my thread title was misleading - sorry. Should have been
"are primary keys _always_ essential?".
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=1