MSSQL 테이블 작성 인덱스 생성 하기
https://ponyozzang.tistory.com/426
--table에만 있는 데이터 table2에 insert
insert into table2
select B.*
from table2 A
right outer join table B on A.id=B.id
where A.id is null
--table2에만 있는 데이터 삭제
delete from table2
where id in ( select A.id
from table2 A
left outer join table B on A.id=B.id
where B.id is null)