title: How to get difference between two rows for a column field?
body: <p>I have a table like this:</p>
  
  <pre><code>rowInt  Value
  2       23
  3       45
  17      10
  9       0
  ....
  </code></pre>
  
  <p>The column rowInt values are integer but not in a sequence with same increament. I can use the following sql to list values by rowInt:</p>
  
  <pre><code>SELECT * FROM myTable ORDER BY rowInt;
  </code></pre>
  
  <p>This will list values by rowInt. How can get get the difference of Value between two rows with the result like this:</p>
  
  <pre><code>rowInt   Value Diff
  2        23    22    --45-23
  3        45    -35   --10-45
  9        0     -45   --0-45
  17       10    10    -- 10-0
  ....
  </code></pre>
  
  <p>The table is in SQL 2005 (Miscrosoft)</p>