Oracle create trigger error (bad bind variable)

database-trigger, oracle, plsql

Solution

It seems like the error code is telling you there's no such column ID in your table...

Problem

I at trying to create trigger with the following code. ``` CREATE OR REPLACE TRIGGER MYTABLE_TRG BEFORE INSERT ON MYTABLE FOR EACH ROW BEGIN select MYTABLE_SEQ.nextval into :new.id from dual; END; ``` I am getting error ``` Error(2,52): PLS-00049: bad bind variable 'NEW.ID' ``` Any ideas? Thanks.

Original source