Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> How to imitate autovalues ?
Hello all,
I am looking for a way to realze the following :
I need a table, consisting of some columns including one to store sequential numbers (for later foreign-key-purposes).
The problem is that I don't want to mention explicitly the sequential-number-column in an insert-statement, but simply :
insert(col2,...,coln) values (val2,..,valn) into TABLE
with ORACLE doing the rest by transforming this into
insert(count_col1,...,coln) values (SEQ.nextval,val2,...,valn) into TABLE. Unfortunately I´m a newbie in ORACLE (guessed it?) and presumably this can be done by a TRIGGER. If I only knew how.... It would be nice if you could give me with some hints how to do it.
Thanks for any help
Thorsten Received on Thu May 07 1998 - 09:59:47 CDT
![]() |
![]() |