Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SEQUENCE IN ORACLE
Hello,
You can use the same sequence to insert into primary keys of two different tables .Every insert will increment the index value by the increment value set.So no duplication occurs whether you use the sequence to insert into single or multiple tables.
konnar.
deepakrajan_at_hotmail.com schrieb im Beitrag
<6h76js$us8$1_at_nnrp1.dejanews.com>...
> 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
> I use the sequence.next_val syntax while inserting new rows in either
Table A
> or Table B.Anyone please answer me.
>
> Thanks in advance for your help.
>
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
Received on Fri Apr 17 1998 - 08:21:29 CDT
![]() |
![]() |