How do i determine what the next value is of the Primary Key Auto increment?
I have been looking in the system databases but i couldnt find any answers.
How do i determine what the next value is of the Primary Key Auto increment?
I have been looking in the system databases but i couldnt find any answers.
I am guessing you mean "the next value to be assigned to an identity column", and your identity column also happens to be used as a primary key. Otherwise, there is no concept in Sybase ASE that would qualify as "Primary Key Auto increment".
Assuming the above, you can get the next value to be assigned by using the function next_identity('table_name'). Note that the result is in varchar format so you may need to convert it back to a number.