|
称1次有10种可能
SQL> with t as(select level n from dual connect by level<=5)
2 select a.n,b.n,c.n,a.n+b.n+c.n s from t a,t b,t c
3 where a.n<b.n and b.n<c.n;
N N N S
---------- ---------- ---------- ----------
1 2 3 6
1 2 4 7
1 2 5 8
1 3 4 8
1 3 5 9
1 4 5 10
2 3 4 9
2 3 5 10
2 4 5 11
3 4 5 12
10 rows selected. |
|