日期:2014-05-16  浏览次数:20387 次

oracle 多表删除 同时删除多表中关联数据

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;