Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create or replace trigger tfa_user_biu
- before insert or update
- on tfa_user
- for each row
- begin
- if :new.userid is null then
- :new.userid := to_number(sys_guid(), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
- end if;
- if inserting then
- :new.created := sysdate;
- :new.created_by := nvl(sys_context('APEX$SESSION','APP_USER'),user);
- end if;
- :new.updated := sysdate;
- :new.updated_by := nvl(sys_context('APEX$SESSION','APP_USER'),user);
- end tfa_user_biu;
Add Comment
Please, Sign In to add comment