如题:例如传入1234 则返回24种组合 即:1234,1243,2134,2341……
传入1123返回12种:1123,1132,3121……
传入1122 返回6种: 1122,1212,1221,2211,2121,2112
传入1112 返回4种: 1112,1121,1211,2111
传入1123返回12种:1123,1132,3121……
传入1122 返回6种: 1122,1212,1221,2211,2121,2112
传入1112 返回4种: 1112,1121,1211,2111
from temp A,temp B,temp C ,temp D
from (
select 1 as x union all
select 2 union all
select 3 union all
select 4
) t1,
(
select 1 as x union all
select 2 union all
select 3 union all
select 4
) t3,
(
select 1 as x union all
select 2 union all
select 3 union all
select 4
) t3,
(
select 1 as x union all
select 2 union all
select 3 union all
select 4
) t4