title: Programming In SQLITE
body: <p>In college I learned PL/SQL, which I used to insert/update data into table programmatically.</p>
  
  <p>So is there any way to do it in SQLITE?</p>
  
  <p>I have one table book which has two columns: <code>readPages</code> and <code>currentPage</code>. <code>readPage</code> contains info about how many pages I've read today and <code>currentPage</code> shows total read pages till today.</p>
  
  <p>Currently I have data for only <code>readPages</code> so I want to calculate <code>currentPage</code> for past days, e.g.</p>
  
  <pre><code>readPages:   19  10  43  20  35   # I have data for 5 days
  currentPage: 19  29  72  92  127  # I want to calculate it
  </code></pre>
  
  <p>So this can be easy with programming, but how to do with sqlite as it is not like plsql.</p>
  
  <p><a href="https://i.stack.imgur.com/abWsG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/abWsG.png" alt="Table Schema And data"></a></p>