Search code examples
primary-keysybase

How to retrieve the Primary key right after inserting a new record in Sybase?


In Sybase how should we get the Primary key right after inserting a new record? Thank you for the help in advance.


Solution

  • I assume you talking about an identity column.

    Documentation here: Retrieving IDENTITY column values with @@identity