how can we write a column values horizontal by using sql stmt;
ex:
select name from table_name;(actual output)
a
b
c
d
require output is
a b c d

Answer Posted / prativa mishra

select xmlagg(xmlelement(g,column_name)).extract('//text()')
from table_name

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use views in stored procedure?

506


How do I view tables in sql developer?

507


How to write pl sql program in mysql command prompt?

507


What are the uses of merge?

715


what happens if null values are involved in expressions? : Sql dba

559






1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins

1143


Does truncate require commit?

535


What is a sql*loader control file?

611


Is sql a backend?

540


Determine if oracle date is on a weekend?

548


Is join same as left join?

521


Mention what problem one might face while writing log information to a data-base table in pl/sql?

667


Could you please provide oca (oracle 10g) dumps for my certification ?

4503


What are different sql data types?

501


Describe types of sql statements?

541