How to create a pivot table I need to create a pivot table using only two columns, home team number and away team number. 

This is the full table:



But i need to combine these two into a single query:



The resulting table should be 32 records. Any ideas?
Use a union. If you want to keep track of the origin for each, you can add a constant column

Select c1 as x, c2 as y, 1 as origin from...
UNION all
Select c3 as x, c4 as y, 2 as origin from...