"Duplicate column name" error when adding column
am 12.01.2006 09:30:08 von ANDY LI have two identical databases running on two separate servers. I want
to add a column to the following table:
classified_cats { acid , name , parent }
Running
ALTER TABLE `classified_cats` ADD `is_active` TINYINT( 1 ) DEFAULT '0'
NOT NULL ;
on server A works fine, so I know the SQL is correct. Running the same
query on server B results in the following error:
Duplicate column name 'acid'.
The show create table SQL for server A is as follows:
CREATE TABLE `classified_cats` ( `acid` int(11) NOT NULL
auto_increment, `name` varchar(255) NOT NULL default '', `parent`
int(11) NOT NULL default '0', PRIMARY KEY (`acid`) ) ENGINE=MyISAM
DEFAULT CHARSET=latin1
The show create table SQL for server B is as follows:
CREATE TABLE `classified_cats` ( `acid` int(11) NOT NULL
auto_increment, `name` varchar(255) NOT NULL default '', `parent`
int(11) NOT NULL default '0', PRIMARY KEY (`acid`,`acid`) )
ENGINE=MyISAM DEFAULT CHARSET=latin1
Note the difference in PRIMARY KEY - I'm not sure what (`acid`,`acid`)
means.
Any ideas on how to overcome this?
TIA
Andy