Oracle trigger, delete one piece of data and delete the associated data of another table at the same time

Oracle trigger, delete one piece of data and delete the associated data of another table at the same time.
Background:     The common ID of
    the main table TableA
    and the associated table TableB : table_ID Create a trigger statement:

create or replace trigger Trigger_Name
after delete on TableA
for each row
begin
delete TableB where table_ID=:old.table_ID
end;
/

Query existing trigger statements:

desc user_triggers
select trigger_name,table_name,description from user_triggers;

Guess you like

Origin blog.csdn.net/qq_38118138/article/details/119352907