How to Get the last identity value used
Answers were Sorted based on User's Feedback
Answer / guest
the last identity value used in an insert can be retrieved
with the @@identity function.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / chandramohan
scope_identity() would be the currect answer. To avoid potential problems professionals suggests this method since it returns the recently added value.
| Is This Answer Correct ? | 1 Yes | 1 No |
How can we call UDF(User Define Function) using C# code in ASP.net ?
What is mean by "fill factor" ? and what is mean by "Index "in sql?
Can we rollback records deleted by a truncate statement?
3 Answers CarrizalSoft Technologies, United Healthcare,
What does truncate do?
What do you mean by acid?
Difference between writing SQL query and stored procedure ?
15 Answers Cognizant, Infosys, TCS, Veritas,
PC(code, model, speed, ram, hd, cd, price) Find the hard drive sizes that are equal among two or more PCs.
Explain the different types of joins?
Where does the copy job runs in the log shipping primary or secondary? : sql server database administration
What are dml (data manipulation language) statements in ms sql server?
How to perform key word search in tables?
What is ACID Property of Transaction?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)