18 September 2010

Difference Between SCOPE_IDENTITY and ROWCOUNT in sql server

Difference Between SCOPE_IDENTITY and atatROWCOUNT in sql server

SCOPE_IDENTITY

Returns the last identity value inserted into an identity column in the same scope. A scope is a module: a stored procedure, trigger, function, or batch. Therefore, two statements are in the same scope if they are in the same stored procedure, function, or batch.

ROWCOUNT"

Returns the number of rows affected by the last statement.

No comments:

Post a Comment

Comments Welcome

Implementing OAuth validation in a Web API

 I mplementing OAuth validation in a Web API Implementing OAuth validation in a Web API using C# typically involves several key steps to sec...