oracle级联删除

通过触发器删除

create or replace trigger deleteMagDetails
  before delete on ir_magazine_detail 
  for each row
declare
begin
 delete from ir_newsletter where id=to_char(:old.info_id);
end deleteMagDetails;

主外键级联删除

alter table BBS_REPLY
  add constraint BBS_TOPIC_FOREIGN foreign key (TOPICID)
  references BBS_TOPIC (TOPICID) on delete cascade;

你可能感兴趣的:(oracle,bbs)