title: Identify duplicates records and insert into another table
body: <p>I have a table like this in this there are duplicate records are there So my requirement is identify the duplicate records and store into another table i.e., Customer_duplicate<br>
  and distinct records into one table     </p>
  
  <p>Existing query:</p>
  
  <pre><code>Create proc usp_store_duplicate_into_table 
  as 
  begin 
      insert into Customer_Duplicate 
      select * 
      from Customer C 
      group by cid 
      having count(cid) &gt; 1                                   
  </code></pre>