Is possible Cancel Insert in a trigger?
I have to split and insert records in a diferent tables based in one table.
I mean i want when i insert 1 record in table A, this info be copied to table B but this record deleted or canceled in table A.
Example of trigger on table A(id,name):
trigger x before insert
for each row
begin
if test then
insert into table b(id,name)
(new.id,new.name);
end if ;
end;
I can copy the record to table B but HOW do i delete or cancel the record to be inserted into table A ?
Thanks