newid  nullif

Chapter 2: Transact-SQL Functions

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.





Copyright © 2005. Sybase Inc. All rights reserved. nullif

View this book as PDF