How to fetch the last inserted record in a particular table?
Answer Posted / raji22559
CommanObject.CommandText="Select @@Identity";
** Note: Over a given connection if any insert statement is
executed on a table with identity column , the back end
sql-server for the connection initializes a parameter by
name "@@Identity" with the value of Identity column for the
last inserted record.
Is This Answer Correct ? | 18 Yes | 8 No |
Post New Answer View All Answers
What is ado.net architecture?
What are datareaders?
Is bulk insert faster than insert?
What is acid in ado.net?
How to copy the contents from one table to another table and how to delete the source table in ado.net?
What is ado.net explain with diagram?
What are the data providers in ADO.NET framework?
Explain the differences between oledb sql server, oledbdotnet provider?
What does executequery return?
What is ado.net and its architecture?
What is difference between ado.net and asp net?
Define different execute methods of ADO.NET command object ?
What is ado and dao?
Explain ado.net features? Benefits? Drawbacks?
What is command class in ado.net?