프로그래밍/DB

오라클 union, minus

-현's- 2015. 9. 2. 18:16
반응형


union

- 연결된 select문의 결과 합을 보여준다. 중복된 것은 하나만 보유준다.



union all

- union과 같이만 중복된 것이 있어도 모두 보여준다.



minus

- 연결된 select문의 결과 차를 보여준다.




●ex

-select * from test;




-select * from test2;




-select * from test

union

select * from test2;




-select * from test

union all

select * from test2;




-select * from test

minus

select * from test2;





반응형