Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Mark Aufflick" <mark at aufflick dot com>
Subject: Re: OT: Sybase and Sequences (Was: Re: Retrieving Identity Value of newly inserted row)
Date: Feb 2 2006 1:13AM

Great. Thanks for the pointers!


On 1/1/1970, ""

>No, Sybase doesn't have sequences (AFAIK neither does MS-SQL).
>Sybase has identity columns, and then you can write your own sequence
>generators using stored procs, or whatever method you want to use.
>There's a good write up on the various methods at
> (the document is 8 years old, but it's
>still valid for the most part).
>To get more information I would recommend the newsgroups at
>news:// (in particular the sybase.public.ase.* groups).
>Lots of Sybase engineers and various other highly competent people read
>these groups and help out.
>The sybase-l mailing list hosted by ISUG (International Sybase User Group)
>is good (go to to subscribe to the list).
> - 01/02/2006 00:43
>Sent by:
>To:     sabol, Robert_Gorrebeeck, sybperl-l
>Subject:        OT: Sybase and Sequences (Was: Re: Retrieving Identity
>Value of newly inserted row)
>Holy cow, you mean Sybase doesn't have sequences?! I've just recently
>started a financial job (which means sybase it seems) and my db
>background is mostly PostgreSQL with some Oracle and a smattering of
>Is it just me, or is Sybase ASE missing some pretty obvious RDBMS
>features and conveniences?
>I know that this list is Sybperl specific, but the people here seem
>pretty reasonable :) Can anyone recommend a good list/forum/community
>where Sybase things are discussed? Eg. in this case, I would be
>interested to read a discussion about sequence best practises.
>On 1/1/1970, "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,
>>I use "Method 3" as docummented at
>>Placeholders work fine using this method.
>> iBurst Wireless Broadband from $34.95/month
>> Forward undetected SPAM to:         
>This message and any attachments (the "message") is
>intended solely for the addressees and is confidential.
>If you receive this message in error, please delete it and
>immediately notify the sender. Any use not in accord with
>its purpose, any dissemination or disclosure, either whole
>or partial, is prohibited except formal approval. The internet
>can not guarantee the integrity of this message.
>BNP PARIBAS (and its subsidiaries) shall (will) not
>therefore be liable for the message if modified.
>                ---------------------------------------------
>Ce message et toutes les pieces jointes (ci-apres le
>"message") sont etablis a l'intention exclusive de ses
>destinataires et sont confidentiels. Si vous recevez ce
>message par erreur, merci de le detruire et d'en avertir
>immediatement l'expediteur. Toute utilisation de ce
>message non conforme a sa destination, toute diffusion
>ou toute publication, totale ou partielle, est interdite, sauf
>autorisation expresse. L'internet ne permettant pas
>d'assurer l'integrite de ce message, BNP PARIBAS (et ses
>filiales) decline(nt) toute responsabilite au titre de ce
>message, dans l'hypothese ou il aurait ete modifie.
> iBurst Wireless Broadband from $34.95/month
> Forward undetected SPAM to: