
테이블 합치기
select * from sample71_a
union
select * from sample71_b;
중복값인 2가 하나로 처리되고 a기준으로 합쳐진다
select * from sample71_a
union all
select * from sample71_b;
all을 써주면 중복되었던 값도 출력된다

UNION을 쓸때는 열의 갯수가 일치해야 사용할수있다
(자료형이 틀려도 쓸수있는 것 같다)
select * from sample71_a
union all
select * from sample71_b
union all
select name from sample31;
select a c from sample71_a
union all
select b c from sample71_b order by c desc;
union을 정렬할때는 각 테이블의 별칭을 통일해서 붙여주고
그별칭에대해(c) 정렬을 시켜준다

select * from sample72_x,sample72_y order by x asc;
select로 테이블명을 나열하게 되면 테이블끼리 교차결합을 실행한다 (2개 이상도 가능하다)
교차결합은 INNER JOIN,OUTER JOIN 보다 상대적으로 사용빈도가 적다고 함
책에서는 UNION과 결합연결의 차이를 행과 열이라고 성명했다
UNION -> 세로방향으로 더해진다
결합연결 -> 가로방향으로 연결