查出结果是ab ac ad bc bd cd ------最佳解决方案-------------------- 如果不考虑效率问题
with t1 as
(
select 1 c1,'a' c2 from dual
union all
select 2 c1,'b' c2 from dual
union all
select 3 c1,'c' c2 from dual
union all
select 4 c1,'d' c2 from dual
)
select a.c2 ------其他解决方案-------------------- b.c2 c1
from t1 a full join t1 b on a.c2 < b.c2
where length(a.c2 ------其他解决方案-------------------- b.c2) > length(a.c2)
c1
------------------
1 ab
2 ac
3 ad
4 bc
5 bd
6 cd ------其他解决方案-------------------- 查询这个有什么用啊 ------其他解决方案--------------------