hello,
I need to change the primary key of a table.
I need to add a column,
how do I do this ?
change primary key
Re: change primary key
You first have to drop the current primary key,
and after create a new.
Best is to do it in 1 SQL alter statement.
and after create a new.
Best is to do it in 1 SQL alter statement.
Code: Select all
ALTER TABLE table_name DROP primary key, ADD primary key(k1, k2, k3);