title: How can I subtract a previous row in sql?
body: <p>What should I query if I wanted to subtract the current row to the previous row. I will use it on looping in vb6.
  Something Like this:</p>
  
  <pre><code>Row
  1
  2
  3
  4
  5
  </code></pre>
  
  <p>On first loop value 1 will not be deducted because it has no previous row, which is ok.
  Next loop value 2 will then be deducted by the previous row which is value 1. And so on until the last row.</p>
  
  <p>How can I achieve this routine?
  By SQL query or VB6 code.Any will do.</p>