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 instead of trigger sql server?

0 Answers  


What does the INSTEAD OF trigger do?

3 Answers  


What are database states in ms sql server?

0 Answers  


i need to know how i display department which has salary > =5000 for the below table Department ----------- salary deptname 1000 a 3000 a 2000 b 3000 b 4000 c 5000 c kindly send the query to thilakvinoth13@gmail.com

6 Answers  


What is use of @@ spid in sql server?

0 Answers  






hi, i have a table called names and field name select * from names name a b c d i want to display like this name a,b,c,d how it is possible Regards Baiju

4 Answers  


Difference between Cluster and Non-cluster index?

32 Answers   Accenture, Agility e-Services, eClinicalWorks, HCL, Infosys, Oracle, Satyam, Yardi,


I have to display ten columns values from diffrent ten tables. how many joins are require?

10 Answers   CarrizalSoft Technologies, HCL,


explain different types of joins? : Sql server database administration

0 Answers  


What is difference statement and preparedstatement?

0 Answers  


Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

0 Answers  


What is difference between aggregate and analytic function?

0 Answers  


Categories