I am looking for something similar-
insert into table1(a, b, c)
select col1 as d, col2 as e, col3 as f from table2
on duplicate key update b = e, c = f;
NOTE - Here table1.a is unique Key.
I am getting error- Unknown column name 'e'.
Is there any solution to use 'On duplicate key' with 'Insert into Select' statement?
Thanks!