Received: from Alex2.cte.Dal.Ca (Alex2.cte.Dal.Ca [134.190.17.62]) by hub.org (8.10.1/8.10.1) with ESMTP id e5RBFW195828 for ; Tue, 27 Jun 2000 07:15:32 -0400 (EDT) Received: from ghost (Ghost.cte.Dal.Ca [134.190.17.89]) by Alex2.cte.Dal.Ca (8.9.3/8.9.3) with SMTP id IAA08670; Tue, 27 Jun 2000 08:27:23 -0300 Message-ID: <006601bfe028$8da6dd60$5911be86@cte.Dal.Ca> From: "DalTech - Continuing Technical Education" To: Cc: References: Subject: Re: Re: unique sequences Date: Tue, 27 Jun 2000 08:12:16 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200006/237 I imagine it should if you create a unique index on the field. Cheers, Christopher Currie ----- Original Message ----- From: K Parker To: Sent: Tuesday, June 27, 2000 1:52 AM Subject: [SQL] Re: unique sequences > > Rather, each time you wish to do an insert, > > query the existing data to see what the > > maximum value is existing in the database. > > Add 1 to that and use this as your new value. > > This is guaranteed to not have any holes in > > the sequence. > > True, but alas it _doesn't_ guarantee uniqueness, since there's nothing to prohibit 2 or more back ends getting the same max() at the > same time... > > Thinking off the top of my head, I'm not sure you can apply FOR UPDATE to an aggregate function, so there's probably no solution there, either. > > > > Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com