Use scenario: Convert a column value to a comma-delimited string
Example: For example, query all of the table space below, now to get all the table space with a comma-delimited string (such as the time of Rman duplicate skip tablespace)
SQL>Select from v$tablespace;name--------------------------- ---systemsysauxctxdapps_ts_tx_dataapps_ts_tx_idxowapubapps_ts_queuesodmolapapps_ts_toolsapps_ts_ Seedapps_ts_interfaceapps_ts_mediaxxcusapps_undots1apps_ts_summaryapps_ts_nologgingxxapexportalapps_ts_ Archivetemp1mesapps_queryxxapsxxagilexxbixxocsxxoa rows selected.
Solution: Wmsys.wm_concat () stitching fields separated by commas
SQL>Selectfrom v$tablespace; Wmsys. Wm_concat (NAME)----------------------------------------------------------------------------- ---system,sysaux,ctxd,apps_ts_tx_data,apps_ts_tx_idx,owapub,apps_ts_queues,odm,olap,apps_ts_tools, Apps_ts_seed,apps_ts_interface,apps_ts_media,xxcus,apps_undots1,apps_ts_summary,apps_ts_nologging,xxapex, Portal,apps_ts_archive,temp1,mes,apps_query,xxaps,xxagile,xxbi,xxocs,xxoa
The Oracle database stitching the values of a column into one row, separated by commas between the values