Hi All,
Felling strange on the below results. DB version 10.2.0.1.0
SQL> select e.ename,d.deptno,e.deptno
2 from emp e left outer join dept d partition by (d.deptno)
3 on (e.deptno= d.deptno);
ENAME DEPTNO DEPTNO
---------- ---------- ----------
CLARK 10 10
KING 10 10
MILLER 10 10
JONES 20 20
FORD 20 20
ADAMS 20 20
SMITH 20 20
SCOTT 20 20
WARD 30 30
TURNER 30 30
ALLEN 30 30
JAMES 30 30
BLAKE 30 30
MARTIN 30 30
CLARK 20 10
KING 20 10
MILLER 20 10
JONES 20 20
FORD 20 20
ADAMS 20 20
SMITH 20 20
SCOTT 20 20
WARD 30 30
TURNER 30 30
ALLEN 30 30
JAMES 30 30
BLAKE 30 30
MARTIN 30 30
28 rows selected.
SQL> select e.ename,d.deptno,e.deptno
2 from emp e left outer join dept d partition by (d.deptno)
3 on (e.deptno= d.deptno)
4 order by 1;
ENAME DEPTNO DEPTNO
---------- ---------- ----------
ADAMS 20 20
ALLEN 30 30
BLAKE 30 30
CLARK 10 10
FORD 20 20
JAMES 30 30
JONES 20 20
KING 10 10
MARTIN 30 30
MILLER 10 10
SCOTT 20 20
SMITH 20 20
TURNER 30 30
WARD 30 30
14 rows selected.
No meaning in the qury I know. But the output when the order by clause is added is strange, atleast for me..
And how the PARTITION BY clause works exactly?
Regrards,
Jeneesh