title: How to copy records from table and insert into same table using stored procedure SQL Server
body: <p>I have following table:</p>
  
  <p><a href="https://i.stack.imgur.com/p2shO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p2shO.png" alt="enter image description here"></a></p>
  
  <p>I want to copy only those records which are from version 0 and their student_id is never repeated in version 1, that means unchanged records. and I want to insert all copied records to same table with version 1. What will be stored procedure for this.</p>