interviews.dotnetthread.com

↑ Grab this Headline Animator

Monday, June 2, 2008

Explain IDENT_CURRENT in T-SQL

IDENT_CURRENT started to be available by SQL Server 2000. It returns the last identity value set on a specified table in any scope of any process. In order to use it, simply provide the table name as a parameter:

Select IDENT_CURRENT('TableName')

The value may be equal to values obtained using other identity (such as @@IDENTITY and SCOPE_IDENTITY) or MAX functions, but it may also be different.

Submit this story to DotNetKicks

No comments:

Post a Comment

Post your comments/questions/feedback for this Article.

 

Latest Articles