title: Oracle - Create Surrogate key for 300 million records
body: <p>There is a table with millions of records which has duplicate records as well. what is the process of creating a new entity as surrogate key (which denotes sequence no.)</p>
  
  <h2>E.g table structure</h2>
  
  <h2>col1 col2</h2>
  
  <p>101   A
  101   A
  101   B
  102   A
  102   B</p>
  
  <p>I would like to create a new column (col3) - which denotes a seq no. </p>
  
  <hr>
  
  <h2>col1 col2 col3</h2>
  
  <p>101   A    1
  101   A    2 
  101   B    3
  102   A    1
  102   B    2</p>
  
  <p>Please suggest me steps to follow to create surrogate key for existing records(300 million), and even when new records are loaded ( I assume trigger is needed to while inserting).</p>