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
Can we use views in stored procedure?
How do I view tables in sql developer?
How to write pl sql program in mysql command prompt?
What are the uses of merge?
what happens if null values are involved in expressions? : Sql dba
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
Does truncate require commit?
What is a sql*loader control file?
Is sql a backend?
Determine if oracle date is on a weekend?
Is join same as left join?
Mention what problem one might face while writing log information to a data-base table in pl/sql?
Could you please provide oca (oracle 10g) dumps for my certification ?
What are different sql data types?
Describe types of sql statements?