title: Link Each Record To All Other Records With Incremental Number
body: <p>I have an SQL Server 2008R2 table that has some user names.  I need to create an association between each user and every other user and I'm not sure how to do this with joins.  As an additional wrinkle, I need to get an incremental unique ID as well.  For example, I have this data:</p>
  
  <pre><code>user_a    User Name A
  user_b    User Name B
  user_c    User Name C
  </code></pre>
  
  <p>I want to run a query and get something like the following:</p>
  
  <pre><code>1    user_a    user_a
  2    user_a    user_b
  3    user_a    user_c
  4    user_b    user_a
  5    user_b    user_b
  6    user_b    user_c
  7    user_c    user_a
  etc...
  </code></pre>
  
  <p>Thanks!</p>