delete trigger
alter table dsls041_copy add (flag char(1));
I have created a trigger so that whenever the source table gets inserted with a new row, or updated, the responding change will happen in the copy table.
create or replace trigger AFTER_INSERT_UPDATE_DSLS041
after insert or update on DSLS041100
for each row
declare
v_flag char(1) :='0';
begin
if INSERTING then
insert into dsls041_copy
(column1,
column2,
flag)
values
(:new.column1,
:new.column2,
v_flag);
elsif updating then
update dsls041_copy set
column2 = :new.column2,
flag = v_flag
where column1 = :old.column1;