Im trying to copy contents from one table to another, both having identical table structure.
INSERT INTO master SELECT * FROM slave
ON DUPLICATE KEY UPDATE id=id+1
This gives the error:
#1052 - Column 'id' in field list is ambiguous
Seems like a simple problem but I can’t resolve it. Does anyone know hot to fix this?
What it says is the exact problem:
Column 'id' in field list is ambiguous. You have to specify whichidcolumn you mean — themaster‘s or theslave‘s. You specify themaster‘sidcolumn by putting a dot between the table name and field name,master.id: