title: Sum of two Columns in a Table SQL
body: <p>My assignment is that i have Three columns <code>Stock_Opening</code>,<code>Stock_New</code>,<code>Stock_Available</code> apart from P_Key and F_key.I have to insert some value in <code>Stock_New</code>. Then <code>Stock_Opening</code> + <code>Stock_New</code> will add up and value will go into <code>Stock_Available</code></p>
  
  <p>Problem:When i insert a value in <code>Stock_New</code> and execute it only update <code>Stock_New</code>
  if i again execute same query it now update both tables <code>Stock_New</code> with current 
   value and <code>Stock_Available</code> with previous value.
  I want that <code>Stock_New</code> and <code>Stock_Available</code> update simultaneously 
  Bellow is Query that i m executing</p>
  
  <pre><code>UPDATE Stock
  SET Stock_New = Stock_New + '2',
      Stock_Available = Stock_Opening + Stock_New
  WHERE Med_ID = 'PANAD223'
  </code></pre>
  
  <p>Bellow are Screenshots linearly</p>
  
  <p><a href="https://i.stack.imgur.com/icmOp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/icmOp.png" alt="This is the table before execution"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Whvju.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Whvju.png" alt="This is the table after first execution"></a></p>
  
  <p><a href="https://i.stack.imgur.com/xEaPn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xEaPn.png" alt="This is the table after second execution"></a></p>