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
Does normalization improve performance?
Is full outer join same as cross join?
How do you modify a table in sql?
What is rownum in sql?
What is the difference between the repeatable read and serializable isolation levels? : Transact sql
what is oltp (online transaction processing)? : Sql dba
what is a primary key? : Sql dba
what is the difference between delete and truncate statement in sql? : Sql dba
How can I delete duplicate rows?
What does dml mean?
what is the syntax used for partition in tsql? : Transact sql
What are the different datatypes available in PL/SQL?
how to get a list of columns in an existing table? : Sql dba
What is %rowtype in pl sql?
What are pl sql procedures?