Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to imitate autovalues ?

How to imitate autovalues ?

From: Thorsten Buchheim <buchheim_at_ls7.uni.dortmund.de>
Date: Thu, 07 May 1998 16:59:47 +0200
Message-ID: <3551CC63.7E8E@ls7.uni.dortmund.de>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US