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 are the two types of periodical indexes?
What are keys in sql?
what is a trigger in mysql? Define different types of trigger. : Sql dba
How can you select unique records from a table?
Explain what is a subquery ?
How to rename a column in the output of sql query?
how to convert character strings to dates? : Sql dba
Explain the types of joins in sql?
explain the difference between bool, tinyint and bit. : Sql dba
Is foreign key mandatory?
What is pl/sql language case sensitive?
what is bcp? When is it used?
Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)
how to select unique records from a table? : Sql dba
what are properties of a transaction? : Sql dba