title: How to iterate properly over cursor in teradata sql?
body: <p>How to iterate  correctly over cursor in Teradata SQL?</p>
  
  <pre><code>while sql code = 0 
  fetch cursor_name into (...)
  do something...
  end while;
  </code></pre>
  
  <p>This doesn't work properly. I had heard about something like 
  for loop cursor, but I found only comparison to casual cursor in documentation, there is no declaration example NOWHERE.</p>