Re: to add table with primary key

From: shakespeare <>
Date: Thu, 28 Feb 2008 15:36:44 +0100
Message-ID: <47c6c6fb$0$14355$>

"codadilupo" <> schreef in bericht news:47c6b8a3$0$12838$
> shakespeare wrote:
>> I often wonder why people use sequences and want to keep control of the
>> values.
> Me too. For example, some of my clients don't want sequence gaps or want
> sequences to start again with 1 at the beginning of each year.
> How do you manage these situations?
> C.
> (followup set to CDOS)

If no gaps are allowed, you have to create your own 'numbering system', and create values at commit time. Gaps come with sequences (or vice versa), like it or not. In my programming days, we used Oracle Designer, which knew functionality (autogen columns) for 'sequence within parent' functionality, by selecting the max. value of the sequence number in the table and adding 1 to it. This had some multi user issues though.

Shakespeare Received on Thu Feb 28 2008 - 08:36:44 CST

Original text of this message