Couldn't get the right approach to automatically set the id value in my table with Oracle. Here's my trigger:
create or replace trigger themes_on_insert
before insert on THEME
for each row
begin
:new.ID := THEMES_SEQ.nextval;
end;
I have two columns: id, description. But when i call insert
insert into theme values('Sport');
it gives me
Error report:
SQL Error: ORA-00947: not enough values
00947. 00000 - "not enough values"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…