views:

251

answers:

2

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 any way to get more info on this Warning?

P.S.

This question could use a better title. ;)

+4  A: 

Oracle requires that you have something between BEGIN and END.

You can use NULL (a no-op):

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

If you want to see what the errors are:

show errors trigger mycooltrigger;
R. Bemrose
Returns "No Errors."
NitroxDM