Merge tables having different columns (SQL Server)
<p>I have 2 tables with details as follows</p>

<p>Table 1</p>

<pre><code>Name | City | Employee_Id
-----------------
Raj  | CA   | A2345
Diya | IL   | A1234
Max  | PL   | A2321
Anna | TX   | A1222
Luke | DC   | A5643
</code></pre>

<p>Table 2</p>

<pre><code>Name | City | Employee_Id | Phone | Age
---------------------------------------
Raj  | CA   | A2345       | 4094  | 25
Diya | IL   | A1234       | 4055  | 19
Max  | PL   | A2321       | 4076  | 23
</code></pre>

<p>As you can see, <code>Employee_Id</code> is the common column in both the columns. I want to update all the entries present in table 1 into table 2. </p>

<p>Raj, Divya and Max are already present in Table 2. So it should not create a duplicate entry in table 2 and skip those 3 entries whereas Anna and Luke are not present in table 2. so this should be added as a new row. </p>

<p>The SQL should be able to merge these 2 columns and ignore the rows which are already present. The final table 2 must be similar to this.</p>

<p>Table 2</p>

<pre><code>Name | City | Employee_Id | Phone | Age
---------------------------------------
Raj  | CA   | A2345       | 4094  | 25
Diya | IL   | A1234       | 4055  | 19
Max  | PL   | A2321       | 4076  | 23
Anna | TX   | A1222       |       |   
Luke | DC   | A5643       |       |   
</code></pre>

<p>Is there a way I could achieve this? I am pretty new to SQL, so any inputs would be of great help. I read about merge and update feature but I guess merge is in Transact-SQL. Also read about joins but could not find a way to crack this. </p>