Re: Retrieving Identity Value of newly inserted row

Michael Peppler <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
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  -  [email protected]  -  http://www.peppler.org/
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com/
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.