To fetch the data from SQL and dispaly in comma seperated , we need use one SQL function for this.
SQL Function: string_agg
This function is useful to achive this functionality.
How to use:
Select string_agg(column_name,',') from DEPT
Output: 1,2,3,4 - data will display like this.
Note: This SQL function is availbale in higher version.
0 Comments
If you have any queries, please let me know. Thanks.