---
title: "oracle 多表删除 同时删除多表中关联数据"
author: "conkeyn"
date: "2012-09-19T16:30:09Z"
tags: []
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2012-09-19T17:05:07Z"
id: 1681614
url: "https://conkeyn.iteye.com/blog/1681614"
---

DELETE from COMIC\_ANIMATION\_ENTITY en where EXISTS  
(select 1 from COMIC\_ANIMATIONEPISODE ep where en.ITEM\_CONTENT\_CODE=ep.content\_code and ep.content\_type=4);

delete from comic\_animation\_to\_type type1 where exists  
(select 1 from comic\_animation a where type1.animation\_id=a.id and a.content\_type=4);

delete from comic\_animation\_to\_classify cl where exists  
(select 1 from comic\_animation an where cl.animation\_id=an.id and an.content\_type=4);

delete from comic\_animationepisode ep where ep.content\_type=4;  
delete from comic\_animation an where an.content\_type=4;