用SQL得到全排列

create table Elements
(
    i int not null primary key
)
GO
insert into Elements
values (1),(2),(3),(4),(5),(6),(7);

编程技巧