Re: to add table with primary key

From: shakespeare <whatsin_at_xs4all.nl>
Date: Thu, 28 Feb 2008 15:36:44 +0100
Message-ID: <47c6c6fb$0$14355$e4fe514c@news.xs4all.nl>

"codadilupo" <yossarian99_at_operamail.com> schreef in bericht news:47c6b8a3$0$12838$5fc30a8_at_news.tiscali.it...
> 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