Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle form builder automatic increment while inserting new row
Hi I create block of data using table mybase (it's structure is id
NUMBER PK, name VARCHAR2(20)).
I want to achieve effect that if I lanch the form and I will press
insert new record the new record will have in Id cell the highest next
possible value (typed automatically by the program).
I make WHEN-CREATE-TRIGGER with structure: Select max(id)+1 into :MYBASE.ID from MYBASE;
which works only for one insertion. When I press insert new record one more time it will still have the old max(id)+1 value. I think it's because the commit isn't executed when pressing insert new record.
So my problem is how to force system to commit change after each insertion or how to achieve the same result in other way. Received on Wed May 31 2006 - 04:41:36 CDT
![]() |
![]() |