title: For loop over array in batch file
body: <p>I need some help. 
  This code</p>
  
  <pre><code>for /f "usebackq delims=" %%a in (`
      mysql -u%dbUser% -e "SHOW DATABASES LIKE '%%sample%%';" 
      ^| findstr /l /v /c:"Database" /c:"information_schema"
  `) do set a=%%a
  </code></pre>
  
  <p>has a result if <strong>echo %%a</strong></p>
  
  <pre><code> sample
   sample_test
   test_sample
  </code></pre>
  
  <p>but after the for loop with that code when i add <strong>echo %a%</strong>
  the result is only</p>
  
  <pre><code> test_sample
  </code></pre>
  
  <p>how could it be so that i can still get the same output on <strong>echo %%a</strong></p>