title: How to do subtraction between two fields in a Table using an SQL query
body: <p>I want to display the subtraction of two values from two different columns to a third column using a SQL query.</p>
  
  <p>This is the table structure:</p>
  
  <pre><code>------------------------------------
  id | subject | Time1 | Time2| Time3
  ------------------------------------
  1  | String1 | 50    |  78  | 
  2  | String2 | 60    |  99  |  
  3  |         |       |      |
  </code></pre>
  
  <p>I want to subtract Time2 from Time1 if both Time1 and Time2 has data and store in Time3.</p>
  
  <p>Output should be like as</p>
  
  <pre><code>------------------------------------
  id | subject | Time1 | Time2| Time3
  ------------------------------------
  1  | String1 | 50    |  78  |  28
  2  | String2 | 60    |  99  |  39
  3  |         |       |      |
  </code></pre>
  
  <p>Thanks!</p>