Oracle Database - Trigger

Card Puncher Data Processing


trigger in Oracle.


Trigger used in apex

create or replace trigger myTableTrigger
before insert or update on myTable
for each row
    if inserting then
        if :new.myPk is null then
          select mySequence.nextval into :new.myPk from dual;
        end if;
        :new.created_on := systimestamp;
        :new.created_by := nvl(v('APP_USER'),nvl(sys_context('userenv','os_user'),user));
    elsif updating then
         :new.updated_on := systimestamp;
         :new.updated_by := nvl(v('APP_USER'),nvl(sys_context('userenv','os_user'),user));
    end if;

Documentation / Reference

Discover More
Card Puncher Data Processing
Oracle - Recursive calls caused by data modification (triggers, function based index, )

When you are doing data modification, you can fired many side effects as : trigger function-based index ... which include also other SQL statement and improve then the recursive calls metrics....
Card Puncher Data Processing
Oracle Database

Documentation about the Oracle database
Card Puncher Data Processing
Oracle Database - Objects

Database object. Each database object is considered to either be: a schema object (ie owned by a user) or a “non-schema object”. See for plsql object type: Object in different namespace are...

Share this page:
Follow us:
Task Runner