I'm trying to create a trigger in Oracle, but it's returning the error
ORA-00942: table or view does not exist
Here is the table:
CREATE TABLE quartos(
idQuarto NUMBER(11),
numeroQ NUMBER(11),
limitePessoas NUMBER(2),
valorDiaria NUMBER(10,2),
situacao NUMBER(1), CONSTRAINT idQuarto_pk PRIMARY KEY (idQuarto)
);
Here is the sequence:
CREATE sequence "quartos_seq";
And here is the trigger:
CREATE trigger "bi_quartos"
before insert on "quartos"
for each row
begin
select "quartos_seq".nextval into :NEW."idQuarto" from dual;
end;
I've creatend another trigger before the same way and nothing went wrong. I just changed the parameters and now its returning that error