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 are the pre-defined functions in the sql server?

0 Answers  


Is a primary key unique?

0 Answers  


Which databases are part of SQL server default installation? Explain the usage of each?

2 Answers   Accenture,


one of my database size is 2gb and Unrestricted Growth for Data file up to 10%.But every day after day I am getting Primary Data file is full 99.999 please take appropriate actions.Why it is? Even disk space is also not full,but still I am getting the alerts.

1 Answers   Cognizant,


What is difference between table aliases and column aliases? Do they affect performance?

0 Answers  






After using delete statement in sql query to delete some records...to retrieve the deleted records we can get using rollback command but till that where it stores means particular location name i need....(after deleting and rollback )

3 Answers   CarrizalSoft Technologies, iGate,


event classes in sql server

2 Answers   Accenture, AFE,


What are the requirements for sql server 2016?

0 Answers  


What is excution Plan in sql server

1 Answers   CarrizalSoft Technologies, TCS,


What is a self join in sql server?

0 Answers  


What is filtered index?

0 Answers  


What is DCL?

0 Answers  


Categories