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 / ajit

select Replace ( Wm_concat( a ), ',' ) Actout
from Tablename;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which table is left in left join?

516


Which tcp/ip port does sql server run on? How can it be changed? : Sql dba

486


what are the advantages and disadvantages of cascading style sheets? : Sql dba

544


What is input buffer in sql*plus?

632


How do I truncate a sql log file?

528






How do I run sql profiler?

577


How do I remove sql developer from windows 10?

502


How do I restart sql?

517


What is normalization in a database?

603


What is the difference between rename and alias?

699


What are the various restrictions imposed on view in terms of dml?

514


What is field delimiter?

627


What is the difference between a procedure and a function?

488


What does the hierarchical profiler does?

563


What is string join?

546