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 acid in ado.net?
What does datareader object do?
How to find the given query is optimised one or not?
What is difference between ado and other data object?
What are dcl commands?
What are all the commands used with Data Adapter?
Explain ODP.net
What does ado stand for in ado.net?
Why is stored procedure used in ado.net?
What is serialization and de-serialization in .net?
Define ado.net?
Define the data provider classes that is supported by ado.net?
Explain the difference between sqlcommand object and command behavior object?
What is an ado connection?
What connected data?