I have two tables with the same structure but slightly different values. If a record of table 1 has some column values as null then that has to update to value in table 2, vice-versa.
Table 1
+--------------------+
| id | exp | last |
+--------------------+
| 1 | null | 4005 |
| 2 | null | null |
| 3 | 10/19 | 1001 |
+--------------------+
Table 2
+-------------------+
| id | exp | last |
+-------------------+
| 1 | 08/23 | null |
| 2 | 07/21 | 3867 |
| 3 | null | 1001 |
+-------------------+
Required Output
Table 3
+--------------------+
| id | code | last |
+--------------------+
| 1 | 08/23 | 4005 |
| 2 | 07/21 | 3867 |
| 3 | 10/19 | 1001 |
+--------------------+
Is this an outer join and if so how would I do this on SQL Server/Azure SQL?
