Re: to add table with primary key

From: Michael Austin <>
Date: Thu, 06 Mar 2008 14:11:22 -0600
Message-ID: <ObYzj.5864$>

codadilupo wrote:
> 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.

Obviously this can NOT be used as a PK. Unless you archive/delete ALL data from the previous year on Jan 1. And the only way to guarantee an uninterrupted sequence would be to have a single-column/single-row table and you update that column and your other table within the context of a single transaction - doing so, of course, will single-thread your entire database. Not horribly bad if the the transactions are very short and very fast and most of all very few...

> How do you manage these situations?

> C.
> (followup set to CDOS)
Received on Thu Mar 06 2008 - 14:11:22 CST

Original text of this message