next_identity

Description

Retrieves the next identity value that is available for the next insert.

Syntax

next_identity(table_name)

Parameters

table_name

identifies the table being used.

Examples

Example 1

Updates the value of c2 to 10. The next available value is 11.

select next_identity (“t1”)
t1
--------
11

Usage

Permissions

Only the table owner, system administrator, or database administrator can issue this command.