title: Update query Get Latest record SQL
body: <p>I have a tableA in which there are two fields Telephone,CallTime
  There is another TableB which have three fields Name,Telephone1 and LastCallTime
  I want to update TableB LastCallTime Field from TableA CallTime field whenever the Telephone1 field of TableB matches the Telephone field of TableA.
  But there is an issue.
  In TableA there are multiple records of Calltime against the Same Telephone.
  i.e</p>
  
  <ul>
  <li>123-456-7891  |   2016-01-01 00:02 </li>
  <li>456-789-8651  |   2015-03-07 02:09</li>
  <li>123-456-7891  |   2016-06-10 12:02</li>
  </ul>
  
  <p>like this,
  So whenever i run the update query,it update the record with the record that is not latest. Is there anyway i can update the table with the latest calltime.For example the last record from above example which is the latest one.</p>
  
  <pre><code>UPDATE TableA 
  SET LastCallTime = TableB.CallTime 
  
  FROM TableB 
  WHERE 
      TableA.Telephone = TableB.Telephone1
  </code></pre>