PLSQL - Nextval fault

Asked

Viewed 80 times

0

The following code:

Create a Trigger that creates a log record every time a product is changed.

CREATE OR REPLACE TRIGGER CREATE_LOG
AFTER UPDATE OR INSERT ON PRODUTO
FOR EACH ROW
BEGIN
INSERT INTO LOG VALUES (IDLOG.NEXTVAL,SYSDATE, 'Produto ' || 
cast(:NEW.IDPRODUTO as varchar(10)) || ' alterado' );
END;

It shows the following error :

Errors: TRIGGER CREATE_LOG Line/Col: 3/1 PL/SQL: SQL Statement Ignored Line/Col: 3/25 PL/SQL: ORA-02289: Sequence does not exist

  • Post the table definition LOG.

  • Hello, Post the DDL(Create) of the table and Sequence to better analyze.

  • The call does not exist. https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_6015.htm#SQLRF01314

  • if another user of the bank runs Quenquence, also make sure that you gave permission using grant

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.