Q:

Oracle Trigger creation with compilation errors

I am trying to create a simple trigger with following code -
CREATE OR REPLACE TRIGGER trg_menu_id BEFORE INSERT ON "menu" FOR EACH ROW
BEGIN
 SELECT
    menu_id_seq.NEXTVAL INTO : NEW.MENU_ID
 FROM
    dual ;
END ;

But I am getting - [Err] ORA-24344: success with compilation error
I don't understand what I am doing wrong.

A:

At last my problem is solved. Field name was in small letter so I have to use NEW."menu_id" instead of NEW.MENU_ID and now it works fine!!!
My new code is-
CREATE OR REPLACE TRIGGER trg_menu_id BEFORE INSERT ON "menu" FOR EACH ROW
BEGIN
 SELECT
    menu_id_seq.NEXTVAL INTO :NEW."menu_id"
 FROM
    dual ;
END ;

