— Oracle 10g —
SELECT deptno, WM_CONCAT(ename) AS employees
FROM scott.emp
GROUP BY deptno;
Output:
10 CLARK,MILLER,KING
20 SMITH,FORD,ADAMS,SCOTT,JONES
30 ALLEN,JAMES,TURNER,BLAKE,MARTIN,WARD
More Related Contents:
- Merging two tables in SQL [closed]
- How can I combine multiple rows into a comma-delimited list in Oracle? [duplicate]
- Is it possible to output a SELECT statement from a PL/SQL block?
- Oracle SQL, concatenate multiple columns + add text
- Pivoting rows into columns dynamically in Oracle
- How can multiple rows be concatenated into one in Oracle without creating a stored procedure? [duplicate]
- Using ‘case expression column’ in where clause
- Concatenate and group multiple rows in Oracle [duplicate]
- Oracle Joins – Comparison between conventional syntax VS ANSI Syntax
- How to use BOOLEAN type in SELECT statement
- How to kill a running SELECT statement
- Selecting the second row of a table using rownum
- Update with Join query in Oracle
- How to count the number of occurrences of a character in an Oracle varchar value?
- Different CURRENT_TIMESTAMP and SYSDATE in oracle
- Oracle date “Between” Query
- ORA-01861: literal does not match format string
- Oracle Date TO_CHAR(‘Month DD, YYYY’) has extra spaces in it
- Query a Table’s Foreign Key relationships
- Is there an Oracle equivalent to SQL Server’s OUTPUT INSERTED.*?
- Current date in Oracle Db
- Get value based on max of a different column grouped by another column [duplicate]
- MySQL equivalent of DECODE function in Oracle
- How to get Oracle create table statement in SQL*Plus
- How do I select all the columns from a table, plus additional columns like ROWNUM?
- Is it possible to query a comma separated column for a specific value?
- Oracle Parameters with IN statement?
- How to handle optional parameters in SQL query?
- How to replace specific values in a oracle database column?
- is there a PRODUCT function like there is a SUM function in Oracle SQL?