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

Home -> Community -> Usenet -> c.d.o.server -> Re: need help with sequence

Re: need help with sequence

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Tue, 24 Feb 2004 14:19:29 -0800
Message-ID: <1077661133.486704@yasure>


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

Original text of this message

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