Resource

IDENT_CURRENT

Shankar M Resources Dec 14, 2012
IDENT_CURRENT column in SQL Server.


IDENT_CURRENT:

  Returns the last identity value generated for a specified table or view. The last identity value generated can be for any session and any scope. 

Syntax:

IDENT_CURRENT( 'table_name' )

Paramters:

table_name

  Is the name of the table whose identity value is returned. table_name is varchar, with no

default.

Return Value:

numeric(38,0)

Returns - NULL on error or if a caller does not have permission to view the object.

The function however differs by its scope and session from @@IDENTITY and SCOPE_IDENTITY

IDENT_CURRENT returns the last identity value generated for a specific

table in any session and any scope.

@@IDENTITY returns the last identity value generated for any table in

the current session, across all scopes.

SCOPE_IDENTITY returns the last identity value generated for any table

in the current session and the current scope.

When the IDENT_CURRENT value is NULL (because the table has never contained rows or has been truncated), the IDENT_CURRENT function returns the seed value.

 References :  MSDN

 

 

post comment
     

Yep, Thanks boss.

Posted by Shankar M Dec 18, 2012

This can be a blog. Resources are useful third party links.Cheers!

Posted by Mahesh Chand Dec 15, 2012
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.