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

select rtrim(xmlagg(xmlelement(E,
EMPID||','||NAME||','||'')).extract('//text()') ,',')
empid from emp1

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a temporal data type?

597


Why self join is used in sql?

497


how to convert numeric values to character strings? : Sql dba

569


What is the execution plan in sql?

558


What is the difference between a query and a report?

522






How do I add a database to sql?

582


what is myisam? : Sql dba

578


What does joining a thread mean?

548


How many parts of a pl sql block are optional?

520


Write a sql select query that only returns each name only once from a table?

570


Which type of cursor is used to execute the dml statement?

534


Why do we use subquery?

489


How do you truncate?

506


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

556


What does subquery mean in sql?

542