title: Reset sequence value as 1
body: <p>I need that after <code>TRUNCATE</code> table, reset his sequence, for this I do :</p>
  
  <pre><code>SELECT setval('mytable_id_seq', 1) 
  </code></pre>
  
  <p>After, when insert rows in table, sequence is started from <code>2</code>  not <code>1</code></p>
  
  <p>How to resert sequence value such, that new first value will be <code>1</code>?</p>
  
  <pre><code> SELECT setval('mytable_id_seq', 0) // gives error that value is out of range
  </code></pre>