我有一个10列的表。我想得到所有可能的排列。具有3列的表示例:
col1 col2 col3
10 40 3,
20 6 1,
排列表将是:
col1 col2 col3
10 40 3,
10 40 1,
10 6 3,
10 6 1,
20 6 1,
20 6 3,
20 40 3,
20 40 1,
我试过交叉连接,但没有成功。最好的方法是什么?
谢谢您!
1条答案
按热度按时间wmtdaxz31#
你可以使用
cross join
:这是一把小提琴。