0

I try to imitate the auto increment functionality in oracle as explained here: How to create id with AUTO_INCREMENT on Oracle?. However, when I try to call the second statement, the trigger, I always get an ORA-24344: success with compilation error and the trigger does not kick in. What can I do?

I call the statements via php/adodb

As you can see, I do not use any newlines in my code. Removing newlines was suggested in other threads.

CREATE SEQUENCE abc_autoinc START WITH 1 INCREMENT BY 1 CACHE 100;

CREATE OR REPLACE TRIGGER abc_trigger BEFORE INSERT ON abc FOR EACH ROW
 BEGIN SELECT abc_autoinc.NEXTVAL INTO :new.abc_id  FROM dual; END
Community
  • 1
  • 1
Lokomotywa
  • 2,624
  • 8
  • 44
  • 73

1 Answers1

0

I had to add an ; after END. Now it works!

Lokomotywa
  • 2,624
  • 8
  • 44
  • 73