Mysql: Table 'name' is specified twice, both as a target for 'UPDATE' and as a separate source for data
2015. 10. 9. 19:12
에러 해결사
Mysql: Table 'name' is specified twice, both as a target for 'UPDATE' and as a separate source for dataMysql: Table 'name' is specified twice, both as a target for 'DELETE' and as a separate source for data 위와 같은 에러는 아래와 같은 경우에 발생하는 에러이다. DETELE FROM tablename WHERE id in (SELECT id FROM tablename); 즉, 같은 테이블에서 조회한 결과를 가지고 다시 같은 테이블의 값을 조작하려고 하기 때문에 문제 발생의 여지가 있다. 이 경우 다음과 같은 방법으로 회피가 가능하다. DELE..