Code Snippets: How to obtain the next identity value from a Sybase Table

There are a few methods available to the Sybase Transact-SQL developer who needs to obtain the next primary key for the next row to be inserted. If the primary column is an identity column then the next_identity function can be used. The proper syntax is: SELECT next_identity( “TABLE_NAME” ) If however you have not used

SYBASE ASE :: Create Table Transact-SQL Syntax – An Overview

SYBASE Adaptive Server Enterprise (ASE) is a relational model database server, that uses Transact-SQL (T-SQL) as the procedural language for creating, modifying and querying the Databases. Detailed below is a short overview of how to create tables in an ASE Database Server including auto generating ID SEQUENCES, foreign keys, and unique indexes. Basic Format Like