Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SEQUENCES IN ORACLE
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!
--
Regards
Matthias Gresz :-) Received on Fri Apr 17 1998 - 07:00:32 CDT