I would like to change the primary key of a table,
But don't know how to do that.
Do I have to drop the table and recreate it?
I don't want to do that.
Solved: How do I change the primary key of a table?
Re: How do I change the primary key of a table?
You can use the following command:
Code: Select all
ALTER TABLE table DROP PRIMARY KEY, ADD PRIMARY KEY (col_a, col_b);