title: How to return count of updated rows in SQL query?
body: <p>I have a SQL "Update" query and on which I am updating the matching records by Inner JOin of temporary table. Please check the query below-</p>
  
  <pre><code>update tblProduct as p
  inner join #temp_Product prod on p.id = prod.id and p.name = prod.name
  </code></pre>
  
  <p>Now I want to return a table which will contain the columns "id", "name" and the count of updated rows (of tblProduct table) on the basis of "id" and "name".</p>
  
  <p>Please check the tables below-</p>
  
  <p><strong>1) tblProduct</strong></p>
  
  <p><a href="https://i.stack.imgur.com/BpyJH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BpyJH.png" alt="enter image description here"></a></p>
  
  <p><strong>2) #temp_Product</strong></p>
  
  <p><a href="https://i.stack.imgur.com/L1YMZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L1YMZ.png" alt="enter image description here"></a></p>
  
  <p><strong>3) And below result should return</strong></p>
  
  <p><a href="https://i.stack.imgur.com/q9Qrj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q9Qrj.png" alt="enter image description here"></a></p>