I have two tables with same structure.
TABLE-1
--------
ID NAME
1 AAAA
2 BBBB
3 CCCC
4 DDDD
TABLE-2
--------
ID NAME
1 AAAA
2 BBBB
3 CCCC
4 DDDD
5 eeee
6 ffff
7 gggg
8 hhhh
9 iiii
How I can compare this tables with MySQL and adding unmatched rows from TABLE-2 in TABLE-1?
Insert into table-1 (select id,name from table-2 where id not in (select id from table-1));