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 / prativa mishra
select rtrim(xmlagg(xmlelement("c",A||' ,'||B||',')).extract('//text()'),',') single_column
from table_name
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What packages(if any) has oracle provided for use by developers?
Can I create table without primary key?
how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba
How do you use join?
What is function and procedure?
can sql servers linked to other servers like oracle? : Sql dba
Is a foreign key always unique?
What is tuple in sql?
Which is faster subquery or join?
what are the advantages of sql ? : Sql dba
What are stored procedures used for?
Does execute immediate commit?
How can I get the number of records affected by a stored procedure?
What is left join in postgresql?
Explain sql data types?