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 sql in mysql? : Sql dba
Can we create clustered index without primary key?
What is dialect in sql?
how to show all tables with 'mysql'? : Sql dba
State few characteristics of pl/sql?
Inline the values in PL/SQL, what does it mean.?
What is a left join?
What are local and global variables and their differences?
Which constraints we can use while creating database in sql?
Which kind of parameters cannot have a default value in pl sql?
Is sql dba a good career? : SQL DBA
How to get unique records from a table?
what is try_catch block in procedure
Explain mutating table error.
How do you write a subquery?