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: SEQUENCES IN ORACLE

Re: SEQUENCES IN ORACLE

From: Jason Salter <jason_at_seahorse.demon.co.uk>
Date: Mon, 20 Apr 1998 23:28:55 GMT
Message-ID: <353bd9f5.2435072@news.demon.co.uk>


On 17 Apr 1998 12:00:32 GMT, GreMa_at_t-online.de (Matthias Gresz) wrote:

>deepakrajan_at_hotmail.com schrieb:
>>
>> Hi,
>>
>> I want to generate unique values using a single Sequence in Oracle 7 database
>> for columns in two tables(Column x is the primary key column for Table A and
>> Column y is the primary key column for Table B)I wish to know if I can assign
>> values for column x and column y using a single Sequence.I wanna know if
>> Oracle Will assign the correct sequence for each of the columns (x or y) when
>[SNIP]
>
>Hi,
>
>if your application doesn't insist in consecutiv pk you can.
>Example:
>
>Your sequence starts with the value 1.
>You insert 3 record into table A.
>You insert 1 row into table B. This record will have the PK 4!

Plus, you'll 'lose' those values if any transactions are rolled back.

Jason. Received on Mon Apr 20 1998 - 18:28:55 CDT

Original text of this message

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