What is the use of SCOPE_IDENTITY() function?

Answers were Sorted based on User's Feedback



What is the use of SCOPE_IDENTITY() function?..

Answer / saravakumar

Returns the most recently created identity value for the
tables in the current execution scope.

Is This Answer Correct ?    4 Yes 1 No

What is the use of SCOPE_IDENTITY() function?..

Answer / bhupesh

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.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More SQL Server Interview Questions

What is the use of Port no?

1 Answers   Wipro,


Suppose i have a table that contains 5 columns like col1,col2...colm5.I want to import only two column through BCP utility.How to do same through BCP in sybase.

0 Answers   HCL,


State the difference between union and union all?

0 Answers  


How do I change my passwords (database, LDAP, and so on) without causing an outage?

0 Answers   IBM,


1.what is the purpose of using alias name in sql server? with certain example? 2.what is cursor?will u plz explain me in detail with certain example?

3 Answers  


Do you know what is replace and stuff function in sql server?

0 Answers  


user defined datatypes

1 Answers   Wipro,


Explain different types of lock modes in sql server 2000?

0 Answers  


your distribution database is full what will u do

0 Answers  


How to read data in a table with "select" statements?

0 Answers  


How to generate create function script on an existing function?

0 Answers  


Is the primary key column of a table an index in ms sql server?

0 Answers  


Categories