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 |
What is exporting utility?
What are the different normalization forms?
write a query to remove duplicate records without using primary key column?
How do I view a trc file?
How do I perform an unattended install of sql server 2000?
How can we determine what objects a user-defined function depends upon?
How to list all field names in the result set using mssql_field_name()?
How we can compare two database data?
Explain datetimeoffset data type in sal server 2008?
What is stored procedure in SQL..??
How many categories of data types used by sql server?
What do we have to check in database testing?
Oracle (3259)
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)