|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Retrieving Identity Value of newly inserted row
Date: Jan 14 2006 4:15PM
On Fri, 2006-01-13 at 15:12 -0500, Edward J. Sabol wrote:
> > Work-around: don't use placeholders, or hack it with a SELECT
> > max(...) after the insert (ugh!)
>
> Or don't use identity columns. For implementing sequential keys, personally,
> I use "Method 3" as docummented at
>
> http://www.isug.com/Sybase_FAQ/ASE/section6.2.html#homegrown
>
> Placeholders work fine using this method.
The next_key table method is fine, but suffers from concurrency problems
if any one table experiences a high rate of inserts.
Michael
--
Michael Peppler - mpeppler@peppler.org - http://www.peppler.org/
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com/
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
|