Afficher un message
Vieux 02/11/2007, 04h19   #4
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how to add a primary key to a table

anne001 wrote:
> How do I remove the primary key label on the foreign keys, so I can
> add a single autoincrement primary key column?
>
> alter table score drop primary key;
> ERROR 1025 (HY000): Error on rename of './sampdb/#sql-185_9' to './
> sampdb/score' (errno: 150)
>
> I think it is because the table has two primary keys for some reason.
>
>
>


Why do you need an autoincrement value? student_id/event_id already is
unique; an autoincrement would be redundant.

The structure given is correct for a table such as this; only in very
rare circumstances should you need an autoincrememt value.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
 
Page generated in 0,05628 seconds with 9 queries