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

What is plpgsql language?

534


how to decrement dates by 1 in mysql? : Sql dba

584


How we can update the view?

605


How do you change a value in sql?

556


what are the features and advantages of object-oriented programming? : Sql dba

549






how can we repair a mysql table? : Sql dba

540


Can you inner join the same table?

529


Explain the methods used to protect source code of pl/sql.

548


What is the maximum number of columns in sql table?

551


Explain the insert into statements in sql?

571


How sql query is executed?

561


what is heap table? : Sql dba

612


What are the set operators in sql?

562


What is interval partition?

546


What is coalesce sql?

518