I am trying to write a simple trigger in Oracle 11g Express Edition:
CREATE OR REPLACE TRIGGER EMPLOYEE_UPDATE
BEFORE UPDATE ON EMPLOYEE
FOR EACH ROW
BEGIN
:new.End_Date := SYSDATE;
END;
But it raises error:
Error(4,1): PLS-00049: bad bind variable 'NEW.END_DATE'
What is the problem with this simple trigger?
Somehow after rewriting CREATE TABLE EMPLOYEE statement problem disappeared. I had
I deleted table and rewrote CREATE TABLE syntax without double quotes:
and problem disappeared.
EDIT:
As @Sathya explained it’s not somehow, in Oracle, an object name, when created with quotes surrounding it’s name becomes case sensitive. My misunderstanding was problem.