Create Trigger ORACLE

Bikinnya via SQL PLUS ya

create or replace
TRIGGER "ADD_MENU_APPROVAL"
AFTER INSERT
   ON sppd_plne.sppd_ttrs_ph
   FOR EACH ROW

BEGIN
  IF to_char(sysdate,'yyyy-mm-dd') = to_char(:new.STARTTIME,'yyyy-mm-dd')  THEN

   INSERT INTO sppd_plne.port_site_usersgroup
   (USERID,GID)
   VALUES
   ( :new.NIP_PH ,'6' );
   --( to_char(sysdate,'yyyy-mm-dd'),'99' );
   --( to_char(:new.STARTTIME,'yyyy-mm-dd'),'100' );

  END IF;

END;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: