Return all possible combinations of values on columns in SQL

后端 未结 8 2483
轮回少年
轮回少年 2020-11-28 10:44

How do I return a list of all combinations of values in 2 columns so they are new rows in T-SQL?

e.g.

Col1, Col2
----  ----
1     2
1     4
1     5
<         


        
8条回答
提交回复
热议问题