none
Cross join question

    Question

  • Create table #TempTable
     (  
     MYteam varchar(30), 
     )

    insert into #TempTable 
     select 'gold'
     union all
     select 'Silver'
     union all
     select 'Platinum'
     union all
     select 'Iron'
     union all
     select 'Plastic'
     union all
     select 'paper'


     select * from #TempTable 

     select * from #TempTable A cross join #TempTable B where A.MYteam <> B.MYteam 

    drop table #TempTable

    These are teams playing with each other, How do i avoid eg. Silver vs gold  cuz there is a gold vs silver.

         
    Friday, April 05, 2013 5:11 PM

Answers