ORA-04098 simple trigger not valid What for?

There is something wrong with this trigger. But what?

CREATE  TRIGGER MYCOOLTRIGGER
AFTER INSERT ON MYCOOLTABLE
REFERENCING NEW AS newRow
FOR EACH ROW
DECLARE
BEGIN
END  MYCOOLTRIGGER;

      

SQL Developer output:

Warning: execution completed with warning
TRIGGER MYCOOLTRIGGER Compiled.

      

Is there a way to get more information about this Warning?

PS

This question might use a better title.;)

+2


source to share


2 answers


Oracle

requires you to have something in between BEGIN

and END

.

You can use NULL

(no-op):



CREATE OR REPLACE TRIGGER MYCOOLTRIGGER
AFTER INSERT ON MYCOOLTABLE
REFERENCING NEW AS newRow
FOR EACH ROW
DECLARE
BEGIN
    NULL;
END  MYCOOLTRIGGER;

      

+4


source


If you want to see what the errors are:



show errors trigger mycooltrigger;

      

0


source







All Articles