i m having the table like this
------------------------
Id | MergeId | name |
------------------------
1 | M1 | Riya |
2 | M2 | diya |
3 | M3 | tiya |
------------------------
MergeId is already assigned as Primary key, now i want a new column ID (AutoIncrement), but when i try to create its shows me like "cant create already a table should have only one primary key" but i cant change my MergeId from Primary to other constrains. please someone help, thankyou
Query
ALTER TABLE `merge_info` ADD `id` INT( 11 ) NOT NULL AUTO_INCREMENT FIRST ,
ADD PRIMARY KEY ( `id` ) ,
ADD INDEX ( `id` ) ;
Error
#1068 - Multiple primary key defined