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 is a table partition?
What is flag in sql?
What are the benefits of triggers?
Which language is used in sql?
What are different types of tables in sql?
what is the difference between myisam static and myisam dynamic? : Sql dba
How to create a menu in sqlplus or pl/sql?
What is a stored procedure in sql with example?
How do I remove duplicates in two columns?
What is the difference between Union and Union all. Which is faster.
How do you write a complex sql query?
Is sql the best database?
Where not exists in sql?
What is the difference between clustered and non-clustered index in sql?
What are types of joins?