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 basic functions for master, msdb, tempdb databases?

2 Answers   CSC,


How much memory that we are using in Logshipping Concept?

0 Answers  


What is database replicaion? What are the different types of replication you can set up in SQL Server?

5 Answers   SAIC, Aptech, HCL, Perpetual,


What is better - 2nd Normal form or 3rd normal form? Why?

2 Answers   TCS, TPK,


Explain basic SQL queries with SELECT from where Order By, Group By-Having?

3 Answers   TetraSoft, Wipro,






Difference between sql server 2000 and sql server 2005?

11 Answers   NIIT, GE, IBM, HCL, Satyam, Aditi Tech, eInfochips, Masim Infotech, Systems Domain,


How To Change Column Ordinal Position in SQL Server 2005 using Query i.e I Want To Add Column at Particular Ordinal Position in SQL Server 2005

2 Answers  


What is the difference between MVC and Teir Architecher? Plz explain with Layyered Programming example...? Thanks

0 Answers   TCS,


There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is written to instantiate a COM object and pass the newly insterted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better?

1 Answers   HCL,


CTE(common table expression)

1 Answers   Thomson Reuters,


Suppose in a situation if two list boxes are there and if you select multiple options based on that the options related to those selected items should display in second list box. Again if we select multiple items in second listbox then the related to those selected items should display . In this scenario how will you design database,tables?

1 Answers   HP,


What will you do If the low Performance occurs?

2 Answers  






Categories