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
Explain the uses of control file.
What is a memo field?
Is left join faster than join?
How to create a menu in sqlplus or pl/sql?
How do I find sql profiler?
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
What are the different tcl commands in sql?
How to read/write files from pl/sql?
tell me about various levels of constraint. : Sql dba
What are synonyms in sql?
What is a relationship and what are they?
Explain the difference between 'between' & 'and' operators in sql
Why do we need view in sql?
Define commit?
Can we use update in sql function?