I have two tables with same structure
**t1**
+------+------+
| code | vid |
+------+------+
| AAA | 2 | - row1
| BBB | 3 | - row2
| AAA | 4 | - row3
| CCC | 2 | - row4
+------+------+
**t2**
+------+------+
| code | vid |
+------+------+
| AAA | 2 | - row1
| BBB | 3 | - row2
| AAA | 4 | - row3
| CCC | 3 | - row4
| DDD | 4 | - row5
+------+------+
**Result table**
**t1**
+------+------+
| code | vid |
+------+------+
| AAA | 2 | - row1
| BBB | 3 | - row2
| AAA | 4 | - row3
| CCC | 2 | - row4
| CCC | 3 | - row5 New Inserted Row
| DDD | 4 | - row6 New Inserted Row
+------+------+
I want to insert new records from table 2 to table 1. The rows row4 and row5 are unmathed rows and I want to added in table 1.
How can I do this ?
Thanks in advance !
Try this query –