0

I'm using SQL developer connected to an Oracle database, and I'm trying to create a trigger that looks something like below:

CREATE OR REPLACE TRIGGER my_trigger BEFORE
 UPDATE ON ZONE FOR EACH ROW BEGIN :new.LAST_UPDATED_DTTM := SYSTIMESTAMP ;
 END;
/

The problem I'm having is that the ":new" causes SQL developer to prompt for the value of the variable "new" (to try to bind the variable).

I tried using:

set define off;

It executes successfully, but I'm still prompted to enter a value for the variable.

Any idea what to do?

user1747935
  • 352
  • 4
  • 10

1 Answers1

4

The trigger is created as expected if I use the "Run Script" option.

If I try to run the create statement using "Run Statement (Ctrl+enter)" it doesn't work.

So to successfully create the script I had to put only the trigger creation statements in the window and use "Run Script".

enter image description here

user1747935
  • 352
  • 4
  • 10