Tuesday, June 19, 2018

Whenever you insert any value into table test1 then table test2 automatically calculate the Total of No 1 and No 2. - DBMS (Trigger)

CREATE OR REPLACE TRIGGER t1
after INSERT ON test1
for each row
declare
a number;
BEGIN
a:= :new.no1 + :new.no2;
insert into test2 values(a); 
dbms_output.put_line('Data Inserted');
END;

No comments:

Post a Comment