title: What is the best way to create and populate a numbers table?
body: <p>I've seen many different ways to create and populate a numbers table.  However, what is the best way to create and populate one?  With "best" being defined from most to least important:</p>
  
  <ul>
  <li>Table created with optimal indexing</li>
  <li>rows generated fastest</li>
  <li>simple code used to create and populate</li>
  </ul>
  
  <p>If you don't know what a numbers table is, look here: <a href="https://web.archive.org/web/20100330144111/http://web.archive.org/web/20150411042510/http://sqlserver2000.databases.aspfaq.com/why-should-i-consider-using-an-auxiliary-numbers-table.html" rel="noreferrer">Why should I consider using an auxiliary numbers table?</a></p>