Hi all,
How do I change the Primary Key field?
I want to add a new column and make it the tables primary key thus replacing the current primary key.
Thanks.
Kevin.
ALTER TABLE foo DROP PRIMARY KEY;
ALTER TABLE foo ADD PRIMARY KEY (column[, column 2...]);
Tried this but not working. Gives error #1064 syntax error.
alter table archive_training drop primary key(class_ID), add primary key(training_ID);
Get rid of class_ID in the drop primary key bit