INSERT INTO tmpTable (id, path) SELECT table.file, files.path FROM table JOIN files ON table.file = files.id ;
select 결과물을 insert 하는 구문이다. 최종 결과물이 될 목표 데이터베이스.files 테이블은 이전이 끝난 후에 auto_increase 설정해야 한다.