title: Copying a row to another table and adding some variable at the beginning in SQL
body: <p>I have tow tables in my database. The first one has some records and the second one has historic records. </p>
  
  <p>When i want to modify a record, I need to put the current record in the historic table and adding the author, the modification date and a comment on the modification. </p>
  
  <p>Here are the definitions of my tables</p>
  
  <p>records (record_id, name, domain, etc...)
  records_h (hist_id, author, comment, modification_date, record_id, name, domain, etc...)</p>
  
  <p>I took a look at the W3C documentation and found <a href="http://www.w3schools.com/sql/sql_insert_into_select.asp" rel="nofollow">this</a>. The examples doesn't show how to add values to this method and i haven't found how to it via google.</p>
  
  <p>Here is what I have done but it's not working:</p>
  
  <pre><code>INSERT INTO record_h 
    (hist_id, USER_COMMENT, AUTHOR, MODIFICATION_DATE, record_id, name, domain, etc...) 
  SELECT hist_id.nextval, 'test', 'toto', CURRENT_TIMESTAMP, 331898, * 
  FROM record 
  WHERE record_id=331898;
  </code></pre>
  
  <p>Can you help me ?</p>