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: Mark C. Stock <mcstockX_at_Xenquery>
Date: Tue, 24 Feb 2004 16:17:24 -0500
Message-ID: <nc6dnfKnbvY3Iqbd4p2dnA@comcast.com>

"Karl Hungus" <nnnnndddddd_at_hotmail.com> wrote in message news:4fO_b.196$1e3.135830_at_twister.nyc.rr.com...
|
| 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
|
|
|

typically one sequence is created for each system-assigned PK (or UK) constraint -- so for PERSON_ID you just need one sequence

however, your intention is not quite clear -- do you intend to create a new record for each 'batch' of votes (multiple poll records per PERSON_ID) or do you just want to increment the VOTES column? sounds like you probably need at least three tables: PERSONS, POLLS, POLL_RESULTS

;-{ mcs Received on Tue Feb 24 2004 - 15:17:24 CST

Original text of this message

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