title: Multiplying two columns of same table and storing result to the third column of same table
body: <p>I m having a table </p>
  
  <pre><code>SALES(sno,comp_name,quantity,costperunit,totalcost)
  </code></pre>
  
  <p>After supplying the <code>costperunit</code> values, <code>totalcost</code> need to be calculated as <code>"totalcost=quantity*costperunit".</code></p>
  
  <p>I want to multiply <code>'quantity'</code> and <code>'costperunit'</code> columns and store the result in <code>'totalcost'</code> column of same table.</p>
  
  <p>I have tried this:</p>
  
  <pre><code>insert into SALES(totalcost) select quantity*costperunit as res from SALES
  </code></pre>
  
  <p>But It failed!</p>
  
  <p>Somebody please help me in achieving this..
  Thanks in Advance</p>