SQL> SELECT deptno 2 , COLLECT(ename) AS emps 3 FROM emp 4 GROUP BY 5 deptno;
DEPTNO EMPS ---------- ------------------------------------------------------------------------------------ 10 SYSTPXeCjDqbWSqWrshgYrRPR4Q==('CLARK', 'KING') 20 SYSTPXeCjDqbWSqWrshgYrRPR4Q==('SMITH', 'JONES', 'SCOTT', 'ADAMS', 'FORD') 30 SYSTPXeCjDqbWSqWrshgYrRPR4Q==('ALLEN', 'WARD', 'MARTIN', 'BLAKE', 'TURNER', 'JAMES') 40 SYSTPXeCjDqbWSqWrshgYrRPR4Q==('MILLER') 4 rows selected.
No comments:
Post a Comment