In this Document
APPLIES TO:Oracle Database - Enterprise Edition - Version 10.1.0.2 to 18.5.0.0.0 [Release 10.1 to 18]Information in this document applies to any platform. GOALFrom Oracle 12.1.0.1 onwards WM_CONCAT function is disabled. We need to use LISTAGG Function. EXAMPLE:
SOLUTIONWhy LISTAGG? LISTAGG is superior to WM_CONCAT. It is fewer latches than wm_concat, latches are lightweight locks that impact the scalability, the more latches we do, the less the scalability is. LISTAGG does not support the "DISTINCT" option. But it does exclude null values. So, you need to take care of the distinct values yourself before applying LISTAGG. EXAMPLE:
More Information: From the doc: Oracle Database 12.2 New Features "Enhanced LISTAGG Functionality Developers can now control the process for managing overflowing LISTAGG aggregates. This increases the productivity and flexibility of this aggregation function."
REFERENCES |