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

Home -> Community -> Usenet -> c.d.o.misc -> Re: pb with sequence

Re: pb with sequence

From: The Wils <awislon_at_rci.rogers.com>
Date: 1997/04/30
Message-ID: <33679D7F.5F8@rci.rogers.com>#1/1

Romuald Jouffrey wrote:
> create sequence mysequence;
>
> and then to use it to insert a new row:
> insert into oneofmytable values (mysequence.NEXTVAL, x1, ..... xn);
>
> oneofmytable is obviously already created and is empty !
> But this doesn't work ! If anybody has any clue, thanks in advance!
>

Maybe a Before-Insert trigger on the Table could handle the assignment of a primary key value if the supplied value is null. Then you wouldn't have to worry about it in any of your insert statements. Then you could say...
"insert into oneofmytable values (NULL, x1, ..... xn);"

Alan Wilson



The man who follows the crowd will usually get no further than the crowd. The man who walks alone is likely to find himself in places no one has ever been.
Received on Wed Apr 30 1997 - 00:00:00 CDT

Original text of this message

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