--String Aggregation
--source : http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php
1* select wm_concat(ename) employees from emp
SQL> /
EMPLOYEES
----------------------------------------------------------------------------------------------------
SMITH,ALLEN,WARD,JONES,MARTIN,BLAKE,CLARK,SCOTT,KING,TURNER,ADAMS,JAMES,FORD,MILLER
SQL> select collect(ename) from emp;
COLLECT(ENAME)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SYSTPhHx4WvmCf/fgQAB/AQFNoQ==('SMITH', 'ALLEN', 'WARD', 'JONES', 'MARTIN', 'BLAKE', 'CLARK', 'SCOTT', 'KING', 'TURNER', 'ADAMS', 'JAMES', 'FORD', 'MILLER')
Subscribe to:
Post Comments (Atom)
Followers
About Me
- reiki
- Torrance, CA, United States
No comments:
Post a Comment