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('//test()'),',') single_column
from table_name
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is data control language (dcl)?
What is exit statement?
Why select is used in sql?
where are cookies actually stored on the hard disk? : Sql dba
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
What does partition by mean in sql?
What is the life of an sql statement?
Is it mandatory for the primary key to be given a value when a new record is inserted?
Write a sql query to get the third highest salary of an employee from employee_table?
What is difference between hql and native sql?
How long it takes to learn pl sql?
How do I sort a table in sql?
how to analyze tables with 'mysqlcheck'? : Sql dba
Can a table contain multiple foreign key’s?
What is sqlcommand?