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 csdl entity framework?
What is dataset and datatable in ado.net?
Is entity framework better than ado.net?
What are the usages of the command object in ado.net?
Why do we need ado.net?
What is difference between executenonquery and executequery?
how can implement dropdownlist in particular of dataset when try to update?
What is defaultview in datatable?
Give an example that shows how to execute a stored procedure in ado.net?
What is difference in record set and dataset?
What is openquery?
What is ado net stands for?
What are the important features of ado.net 2.0?
Why is stored procedure used in ado.net?
What is the use of adodc?