title: mysql DECLARE WHILE outside stored procedure how?
body: <p>I fairly new to mysql but have MS SQL experience.</p>
  
  <p>Is it possible to <strong>declare variables</strong> and use <strong>while</strong> statement
  outside <strong>stored procedure</strong>?</p>
  
  <p>I only found examples where guys doing like this</p>
  
  <pre><code>1. procedure created
  2. execute proc
  3. drop proc
  </code></pre>
  
  <p>Suggest me the right way</p>