title: How to update column of duplicate row in SQL Server
body: <p>I have a table <code>tUser</code> with columns <code>username</code>, <code>password</code>, <code>email</code>, <code>Active</code>.</p>
  
  <p>I need to set the <code>Active</code> column of duplicate rows to 0. How can I achieve this?</p>
  
  <p>Eg: Table values are</p>
  
  <pre><code>UserName    Password   Email             Active
  -----------------------------------------------
  Demo        demo       abc@gmail.com       1
  Demo        demo       abc@gmail.com       1
  Demo        demo       abc@gmail.com       1
  </code></pre>
  
  <p>I need to change this value to</p>
  
  <pre><code>Demo demo abc@gmail.com 1
  </code></pre>
  
  <p>and the other 2 rows should be</p>
  
  <pre><code>Demo demo abc@gmail.com 0
  Demo demo abc@gmail.com 0
  </code></pre>