Is it possible to create only one trigger in Oracle that fires before and after data got inserted into a table?
begin
if inserting THEN
-- This code should be run before insertion:
:new.cr_timestamp := SYSTIMESTAMP;
IF :NEW.id IS NULL THEN
SELECT sq_table_id.NEXTVAL
INTO :NEW.id
FROM dual;
END IF;
-- Now I want code which run after the insertion..
end if;
end;
So is there a flag which indicates if its before or after the insertion?