0

Just wondering why i get this error when I run sql in phpmyadmin

I get this error:

#1060 - Duplicate column name

when I run this code:

ALTER TABLE filters ADD location_dating VARCHAR(100);
ALTER TABLE filters ADD age_range VARCHAR(100);
ALTER TABLE filters ADD distance_range VARCHAR(100);
UPDATE filters SET location_dating='0',age_range='16,100',distance_range='0,500’;

Any ideas why?

juergen d
  • 201,996
  • 37
  • 293
  • 362
Anders
  • 1
  • 1
  • Probably because you want to add a column that already exists? – juergen d Sep 24 '16 at 10:20
  • Here you try to add duplicate column name thats why the error.I hope you try to change `column name` of the particular table. right? for change name of the column using this query `ALTER TABLE `table_name` CHANGE `old_name` `new_name` VARCHAR(255) NOT NULL;` or if you add new column means `ALTER TABLE tab_name ADD col_name VARCHAR( 100 )` – Karthi Sep 24 '16 at 10:29
  • Hi, but is no duplicate table like that please see screenshot here: http://postimg.org/image/3rogaukdn i am confused. – Anders Sep 24 '16 at 10:40
  • Sorry guys i found the table in Filters and made the changes manualy in the column, sorry for waisting your time. – Anders Sep 24 '16 at 11:10

0 Answers0