What is the use of SCOPE_IDENTITY() function?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain an incremental backup?

772


How do I view a stored procedure in sql server?

766


What are the events recorded in a transaction log?

761


Explain different types of index?

796


What is system stored procedures?

786


what's the maximum size of a row? : Sql server database administration

778


What are wait types?

762


How can you transfer data from a text file to a database table? Or how can you export data from a table to a comma delimited (csv) file? Or how can you import data from ms access to a table in a database? Or how can you export data from a table to an excel file?

796


What are Spatial data types in SQL Server 2008

754


List out the different types of locks available in sql server?

735


What is the command to change the recovery model?

794


What are the ways available in sql server to execute sql statements?

805


How is table type constraint applied to a table?

757


Explain tables in SQL Azure?

114


What is collation sensitivity? Explain different types.

755