title: Quickest way to fill database table with unique "pairs" (zipcodes)
body: <p>Backstory: To help my app quickly calculate the crow-flies distance between two zips (and also Google Map's distance..), I am storing the data in a table with essentially three columns: <code>ZipCode1</code>, <code>Zipcode2</code> and <code>Distance</code>.</p>
  
  <p>I have another table in my database named <code>Zipcodes</code> that contains all U.S. zip codes.</p>
  
  <p>I would like to "pre-fill" my distance table with all unique "pairs" of zip codes. Since I don't want duplicate pairs, <code>ZipCode1</code>'s integer value should always be less than <code>ZipCode2</code>.</p>
  
  <p>So, that leaves me with the conundrum of figuring out the quickest/best way to do this. Bonus points if there's also a way to re-run the method to just add the missing pairs.</p>
  
  <p>If I was coding this in C#, it would be trivial write out, but would run very slowly (as far as I can tell). There must be some quicker method, perhaps via direct SQL?</p>
  
  <p>Any help/ideas are appreciated.</p>