Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to add comma to the row returned values from a select query

user9977206Dec 22 2020

Hi,

I'm trying to get the column values to be exported to file with comma separated

select ename from emp
Ename
ADAMS
ALLEN
BLAKE
CLARK
FORD

I want to add comma to the rows have only values

like
Ename
ADAMS,
ALLEN,
BLAKE,
CLARK,
FORD

I tried with concat ',' it is adding the comma to last row value also ,which I do not want.

ANy inputs are appreciated.

Thanks,
Brk

This post has been answered by user9977206 on Dec 24 2020
Jump to Answer
Comments
Post Details
Added on Dec 22 2020
3 comments
2,536 views