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

When to use inner join and left join?

612


What is lookup table in sql?

694


Can we delete column in sql?

663


what is a trigger? : Sql dba

654


what is bcp? When is it used?

670






What is trigger point?

637


What found sql?

604


what is a control file ? : Sql dba

659


What is oracle pl sql developer?

616


Explain dml and ddl?

637


How do you truncate?

579


What are joins in sql?

625


What is trigger in sql? Explain

608


What is the purpose of cursors in pl/sql?

715


What are the types of keys?

595