Skip to content
Advertisement

Get every unique pair combination of a column in SQL

Lets say I have given table:

How do I JOIN / combine the table with itself so I get every possible unique pair combination of the first column:

Advertisement

Answer

You can do something like this. Cross JOIN is used for cross product

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement