have table with two columns with datatypes as number and
varchar and the values in
A column like 1,2,3 AND B column values like a,b,c.
now need to display data in a single column as 1,a,2,b,3,c.

Answer Posted / sona mathew

select listagg(c1||','||c2,',')
within group (order by c1||','||c2)
from tab;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bitemporal narrowing?

737


what are the differences between char and nchar? : Sql dba

595


Why are sql stored procedures used?

617


What is the use of nvl function?

619


What are the different types of tables in sql?

485






How to Execute a Package in PL/SQL.?

587


How many unique keys can a table have?

557


Explian rowid, rownum?

564


how to load data files into tables with 'mysqlimport'? : Sql dba

523


What is lookup table in sql?

605


What is cte sql?

517


What is the order of sql select?

572


Why do we use %rowtype & %type in plsql?

607


Why we use stored procedure instead of query?

538


How do I truncate a sql log file?

537