That's two words where I come from.
Originally Posted by r937
anyway, I still get an error.
ALTER TABLE `business_type`
, DROP PRIMARY KEY
, ADD INDEX business_type_ix
, PRIMARY KEY (business_type,business_sub_type,business_category);
I tried to do it with phpMyAdmin and was only able to create a unique index. when I then tried to remove the PK, it told me that I couldn't because there 'could only be one auto_increment column and it had to be the PK' (or words to that effect. Stands to reason I suppose.
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' PRIMARY KEY (business_type,business_sub_type,business_category)' at line 4
And maybe I only need a unique index anyway? I am just trying to prevent duplicate entries and this has altered my table to createa unique index .
not much like the docs said it should be done.
ALTER TABLE `tbl_business_type` ADD UNIQUE `business_type_ix` ( `business_type` , `business_sub_type` , `business_category` )