trigger fires when insert,Update ,delete statemet execute
eg:
if we have table name : t1
if we calculate the sum and updated in another table t2 when insert into t1 occurs,
eg:
CREATE OR REPLACE TRIGGER tr1
BEFORE
insert on sampletable
for each row
begin
SELECT sampletable2.id.nextval INTO :NEW.R_ID FROM dual;
end;
cursor:
What is Cursor in sql server[
^]