Retrieves the next identity value that is available for the next insert.
next_identity(table_name)
identifies the table being used.
Updates the value of c2 to 10. The next available value is 11.
select next_identity (“t1”) t1 -------- 11
next_identity returns the next value to be inserted by this task. In some cases, if multiple users are inserting values into the same table, the actual value reported as the next value to be inserted is different from the actual value inserted if another user performs an intermediate insert.
next_identity returns a varchar chararcter to support any precision of the identity column. If the table is a proxy table, a non-user table, or the table does not have identity property, NULL is returned.
Only the table owner, System Administrator, or database administrator can issue this command.
Copyright © 2005. Sybase Inc. All rights reserved. |