프로그램/DB

[Oracle] 여러 row를 한 줄로 출력 - (WMSYS.WM_CONCAT)

영혼과영혼의양식 2012. 9. 18. 15:06

여러 row를 하나의 row로 출력

 

 

사용 예) - oracle 10g이상에서 사용할 수 있음

select card_status

  from msr_card_master

 where card_status is not null

 group by card_status;

 

 

select WMSYS.WM_CONCAT(CARD_STATUS) AS card_status

  from ( select card_status

           from msr_card_master

          where card_status is not null

          group by card_status 

          order by card_status )