오라클 listagg 함수
DB CAFE
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
ListAgg
- Row를 Col로 변경
Syntax (12c 개선)
LISTAGG(
COLUMN, ','
[ on overflow (truncate|error) ]
[ text ] [ (with|without) count ]
) within group (order by cols)
예시)
select table_name,
listagg(index_name, ',' on overflow truncate
'click here'
) within group (order by index_name) inds
from user_indexes
group by table_name;