union을 사용해도 될 것 같네요.....
select TOT
from ( select sum(A) as TOT form Table where B=1 and C=1
union all
select sum(A) as TOT form Table where B=1 and C=2
)
돌풍예감 님이 쓰신 글 :
: select sum(A) as TOT_1 form Table where B=1 and C=1
: select sum(A) as TOT_2 form Table where B=1 and C=2
:
: 위 두개의 select 문을 하나의 select 문으로 할 순 없나요??
: (A, B, C)는 필드명입니다
|