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 / sunaksha

select listagg( A||','||B || ',') within group (order by A) from table_name;

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What can I use instead of union in sql?

518


Does sql view stored data?

536


How do I install microsoft sql?

531


Mention what are the benefits of pl/sql packages?

537


What is difference between cursor and trigger?

559






What is the requirement of self-join?

546


What is the difference between the sql*loader and import utilities? : aql loader

600


What is a record in pl/sql?

551


How do I run sql profiler?

588


Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql

531


what are sequences

1096


What is the advantage of nosql?

527


How to use distinct and count in sql query? Explain

611


What is a memo field?

529


What is procedure in pl sql?

538