Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

원인

MySQL 은 Oracle 과는 달리 UPDATE 나 DELETE 시 자기 테이블의 데이타를 바로 사용 못함못하므로 아래와 같은 SQL 을 실행시 1093 에러가 발생함.

Code Block
languagesql
DELETE
FROM cwd_group
WHERE id IN
    (SELECT DISTINCT a.id ext_id
     FROM cwd_group a
     JOIN cwd_group b ON a.group_name=b.group_name
     JOIN cwd_directory d ON d.id=a.directory_id
     WHERE a.directory_id != b.directory_id
       AND directory_name = 'My JIRA Server');

...