I have an existing Table A with columns c1, c2, c3, c4, c5. I have another Table B with c1, c2, c3.
Table A (c1, c2, c3, c4, c5, C6)
Table B (c1, c2, c3)
I want to introduce a new column in Table A c6 and dump data from Table B c3.
- Table A c2 and Table B c2 are userid's
- Table A c2 may have duplicates.
I also want to update insert c6 values for duplicates.
Please help me I wrote below query but it ran for 2 hours did nothing. Table A has 1 million records and Table B has 100 thousand records
I am using HeidiSQL tool to do this update. I was wondering if this is an issue with the tool?
UPDATE Table A
INNER JOIN Table B ON
Table A.c2 = Table B.c2
SET Table A.c6 = Table B.c3;