View Single Post

   
  #4 (permalink)  
Old 02-28-2008, 11:29 AM
Jerry Stuckle
 
Posts: n/a
Default 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
==================

Reply With Quote