with base as
(
select 'ITEM1' as ITEM, 1 as A, 4 as B, 2 as C, 3 as D from dual
union all
select 'ITEM2' as ITEM, 1 as A, 4 as B, 2 as C, 3 as D from dual
union all
select 'TOTAL' as ITEM, 2 as A, 8 as B, 4 as C, 6 as D from dual
)
select * from base;
BASE 테이블 값 | 추가하고싶은값 | ||||
ITEM | A | B | C | D | SUMMARY |
ITEM1 | 1 | 4 | 2 | 3 | 10 |
ITEM2 | 1 | 4 | 2 | 3 | 10 |
TOTAL | 2 | 8 | 4 | 6 | 20 |
위와같이 SUMMARY에 ROW의 값을 SUM 하고싶어서 문의 드립니다.