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 the command dbcc checkdb used for?
What is instead of dml trigger?
What happens if date-only values are provided as date and time literals?
What happens when transaction log is full?
What is the basic difference between clustered and a non-clustered index?
what are triggers? : Sql server database administration
What is dknf in normalization form?
How is a full-text index updated?
create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration
What are data files?
What are the database roles? : sql server security
What is the difference RDBMS and Graph Database?
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)