Results 1 to 11 of 11
Thread: CHANGING primary key
Dec 17, 2008, 17:12 #1
- Join Date
- Sep 2008
- 0 Post(s)
- 0 Thread(s)
CHANGING primary key
I want to change my primary key from being one col to being three. I can't seem to find a way of 'change primary key'. all I find is 'drop' and 'create'.
With use of the MySQL manual I have created a script to replace the current PK with a new one.
I don't want to break the table so, would someone please advise me if this is correct.
ALTER TABLE `business_type` DROP PRIMARY KEY ADD INDEX business_type_ix PRIMARY KEY ( business_type, business_sub_type, business_catgeory ) PRIMARY KEY