title: How to reuse a cursor in tsql from the begining
body: <p>How to reuse a cursor in tsql from the beginning without changing its definition.</p>
  
  <p>I saw this topic <a href="https://stackoverflow.com/questions/17317732/can-i-reset-cursors-position-to-the-begining">link</a> but I dont know what to do after this</p>
  
  <pre><code> fetch first from c;
  </code></pre>
  
  <p>I used after this code :</p>
  
  <pre><code>WHILE @@FETCH_STATUS = 0 
  
          BEGIN 
  
          ...
              FETCH NEXT FROM c INTO @myVariable;
          END;
  
          CLOSE c;    
          DEALLOCATE c;
  </code></pre>
  
  <p>but it didnt work.</p>