select listagg(serial_number, ‘’’,’’’) within group (order by serial_number) ||’’’’ from table where rownum<5;
oracle利用listagg把多列合成一行并用指定分隔符分割
未经允许不得转载:爱站程序员基地 » oracle利用listagg把多列合成一行并用指定分隔符分割
select listagg(serial_number, ‘’’,’’’) within group (order by serial_number) ||’’’’ from table where rownum<5;