Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: need help with sequence
Karl Hungus wrote:
> Im writting a little poll application using oracle, and I want to
> autoincrement the votes.
>
> My table has a column that holds the votes for each person, and is set up
> like this:
>
> person_id number
> votes number
>
> If I wanted to use sequences, would I need to create 10 separate sequences,
> assuming there are ten people being voted on?
>
> Thanks in advance,
> Karl
One sequence will suffice if all you want is a surrogate key. It is not unusual in an object-relational model within Oracle to use a single sequence for all tables within a schema.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Tue Feb 24 2004 - 16:19:29 CST
![]() |
![]() |